diff --git a/src/CommandLineArgumentsParser/CommandLineParser.cs b/src/CommandLineArgumentsParser/CommandLineParser.cs index 5ed0c2e..c9f73b5 100644 --- a/src/CommandLineArgumentsParser/CommandLineParser.cs +++ b/src/CommandLineArgumentsParser/CommandLineParser.cs @@ -467,8 +467,9 @@ private void ParseAdditionalArguments(List argsList, int i) } AdditionalArgumentsSettings.ProcessArguments(); } - else + else if(i < argsList.Count) { + // only throw when there are any additional arguments throw new CommandLineFormatException( Messages.EXC_ADDITIONAL_ARGUMENTS_FOUND); }