Closed zadykian closed 2 years ago
@neuecc what do you think? I'm ready to implement this, but it's definitely a breaking change for some cases.
Maybe default behaviour should be leaved untouched with ability to enable strict parsing via ConsoleAppOptions
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Proposal
Change behaviour of
ConsoleAppEngine.TryGetInvokeArguments
method to always handle values starting with dashes as parameter names but not values.In this case it would be required to pass value starting with dashes wrapped into quotes. For example:
Motivation
Current parsing mechanism doesn’t provide correct error messages in case if one of multiple parameters is passed without value. For example:
App definition:
Input:
Output:
So, "--last-name" is parsed as value of --first-name parameter
Expecting output: