You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the parser.AdditionalArgumentsSettings.AcceptAdditionalArguments to false it always throws an exception, regardless of the arguments provided.
Example:
varstateArgument=newEnumeratedValueArgument<string>('s',"state","Filters the list for the specific state.",new[]{"open","closed","all"});varparser=newCommandLineParser.CommandLineParser();parser.Arguments.Add(stateArgument);// parses just fineparser.ParseCommandLine(new[]{"--state","open"});// when using AcceptAdditionalArguments=false it crashes with the same (valid arguments)varcrashingParser=newCommandLineParser.CommandLineParser();crashingParser.Arguments.Add(stateArgument);crashingParser.AdditionalArgumentsSettings.AcceptAdditionalArguments=false;crashingParser.ParseCommandLine(new[]{"--state","open"});
Fix: one additional if check in ParseAdditionalArguments.
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Using AcceptAdditionalArguments=true always throws exception
Using AcceptAdditionalArguments=falsealways throws exception
Jun 12, 2017
ghost
changed the title
Using AcceptAdditionalArguments=falsealways throws exception
Using AcceptAdditionalArguments=false always throws exception
Jun 12, 2017
When setting the parser.AdditionalArgumentsSettings.AcceptAdditionalArguments to false it always throws an exception, regardless of the arguments provided.
Example:
Fix: one additional if check in ParseAdditionalArguments.
Proposed fix as a pull request.
The text was updated successfully, but these errors were encountered: