When setting the parser.AdditionalArgumentsSettings.AcceptAdditionalArguments to false it always throws an exception, regardless of the arguments provided.
Example:
var stateArgument = new EnumeratedValueArgument<string>('s', "state", "Filters the list for the specific state.", new[] { "open", "closed", "all" });
var parser = new CommandLineParser.CommandLineParser();
parser.Arguments.Add(stateArgument);
// parses just fine
parser.ParseCommandLine(new[] { "--state", "open" });
// when using AcceptAdditionalArguments=false it crashes with the same (valid arguments)
var crashingParser = new CommandLineParser.CommandLineParser();
crashingParser.Arguments.Add(stateArgument);
crashingParser.AdditionalArgumentsSettings.AcceptAdditionalArguments = false;
crashingParser.ParseCommandLine(new[] { "--state", "open" });
Fix: one additional if check in ParseAdditionalArguments.
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.