include HelpText in CommandParsingError, write it to stdout
This commit is contained in:
parent
22fb17422f
commit
35732fc07d
4 changed files with 20 additions and 7 deletions
|
@ -10,8 +10,11 @@ namespace Microsoft.DotNet.Cli.CommandLine
|
|||
{
|
||||
private readonly bool _isRequireSubCommandMissing;
|
||||
|
||||
public CommandParsingException(string message) : base(message)
|
||||
public CommandParsingException(
|
||||
string message,
|
||||
string helpText = null) : base(message)
|
||||
{
|
||||
HelpText = helpText ?? "";
|
||||
Data.Add("CLI_User_Displayed_Exception", true);
|
||||
}
|
||||
|
||||
|
@ -27,6 +30,8 @@ namespace Microsoft.DotNet.Cli.CommandLine
|
|||
|
||||
public CommandLineApplication Command { get; }
|
||||
|
||||
public string HelpText { get; } = "";
|
||||
|
||||
public override string Message
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue