help text adjustments for dotnet sln

This commit is contained in:
Jon Sequeira 2017-03-14 11:23:19 -07:00
parent 96683c1421
commit 898d10cb2d
5 changed files with 14 additions and 14 deletions

View file

@ -79,7 +79,7 @@ namespace Microsoft.DotNet.Cli
}
catch (HelpException e)
{
Reporter.Output.Write(e.Message);
Reporter.Output.WriteLine(e.Message);
return 0;
}
catch (Exception e) when (e.ShouldBeDisplayedAsError())
@ -92,7 +92,7 @@ namespace Microsoft.DotNet.Cli
}
catch (Exception e) when (!e.ShouldBeDisplayedAsError())
{
Reporter.Output.WriteLine(e.ToString().Red().Bold());
Reporter.Error.WriteLine(e.ToString().Red().Bold());
return 1;
}

View file

@ -25,13 +25,14 @@ namespace Microsoft.DotNet.Cli
description: LocalizableStrings.AddSubcommandHelpText),
CommonOptions.HelpOption()),
Create.Command("list",
"List all projects in the solution.",
".NET List project(s) in a solution file Command",
CommonOptions.HelpOption()),
Create.Command("remove",
"Remove the specified project(s) from the solution. The project is not impacted.",
Accept.OneOrMoreArguments()
".NET Remove project(s) from a solution file Command",
Accept.OneOrMoreArguments(o => CommonLocalizableStrings.SpecifyAtLeastOneProjectToRemove)
.With(name: "args",
description: LocalizableStrings.RemoveSubcommandHelpText),
CommonOptions.HelpOption()));
}
}

View file

@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Tools.Sln.Remove
throw new ArgumentNullException(nameof(appliedCommand));
}
if (_appliedCommand.Arguments.Count == 0)
if (appliedCommand.Arguments.Count == 0)
{
throw new GracefulException(CommonLocalizableStrings.SpecifyAtLeastOneProjectToRemove);
}

View file

@ -18,10 +18,11 @@ namespace Microsoft.DotNet.Cli.Sln.List.Tests
Usage: dotnet sln <SLN_FILE> list [options]
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
Options:
-h|--help Show help information";
-h, --help Show help information
";
[Theory]
[InlineData("--help")]

View file

@ -15,16 +15,14 @@ namespace Microsoft.DotNet.Cli.Sln.Remove.Tests
{
private const string HelpText = @".NET Remove project(s) from a solution file Command
Usage: dotnet sln <SLN_FILE> remove [options] [args]
Usage: dotnet sln <SLN_FILE> remove [options] <args>
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
<args> Remove the specified project(s) from the solution. The project is not impacted.
Options:
-h|--help Show help information
Additional Arguments:
Remove the specified project(s) from the solution. The project is not impacted.
-h, --help Show help information
";
private const string ExpectedSlnContentsAfterRemove = @"