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
Hi. I am having problems similar to described in #776 but working with version 2.9.1.
My scenario is this:
usingCommandLine;namespaceQuickStart{classProgram{publicclassOptions{[Option('i',"input",Required=true,HelpText="The name of the videos to split. E.g. media split -i file1.mp4 file2.mp4")]publicIEnumerable<string>Input{get;set;}=newList<string>();[Option('s',"seconds",Required=true,HelpText="A space separated list of seconds to split the video. E.g. media split -s 5 10")]publicIEnumerable<int>Seconds{get;set;}=newList<int>();}staticvoidMain(string[]args){newParser(with =>{with.IgnoreUnknownArguments=true;}).ParseArguments<Options>(args).WithParsed<Options>(o =>{Console.WriteLine("Quick Start Example!");}).WithNotParsed(errors =>{foreach(vareinerrors){Console.WriteLine($"Error: {e}");}});}}}
Being IgnoreUnknownArguments = true when I pass more parameters (ex. --input c:\temp\test.mp4 --seconds 2 4 --test1 xxxx) it returns
Error: CommandLine.BadFormatConversionError
Error: CommandLine.MissingRequiredOptionError (in seconds option)
If I change the type of Seconds to IEnumerable<string> it works correctly (this is going to be my workaround at this moment) but seems like library continues going crazy trying to parse unknown arguments in this scenario.
The text was updated successfully, but these errors were encountered:
Hi. I am having problems similar to described in #776 but working with version 2.9.1.
My scenario is this:
Being IgnoreUnknownArguments = true when I pass more parameters (ex.
--input c:\temp\test.mp4 --seconds 2 4 --test1 xxxx
) it returnsIf I change the type of Seconds to
IEnumerable<string>
it works correctly (this is going to be my workaround at this moment) but seems like library continues going crazy trying to parse unknown arguments in this scenario.The text was updated successfully, but these errors were encountered: