Open aybe opened 11 months ago
Note that the library has changed significantly since the version you are using was made available. These changes also encompass significant change of the public API surface of the library. Among other things, option/argument/command types are now prefixed with "Cli" and feature a streamlined and more concise set of properties, command handlers have been substituted by actions, the invocation pipeline appearing in your stack trace has also been eliminated.
Thus, i'd suggest you either wait for a proper non-beta release (whenever that will be) or migrate to the currently available beta and see whether the issue still occurs with the current beta.
Note that new/current betas are so far not accessible through the nuget.org feed, but through a separate "daily builds" nuget feed that is mentioned in the readme.md. Latest version available through this feed is currently 2.0.0-beta4.23407.1.
Also note that there is little to no documentation available yet for the new API surface. If you choose to migrate now to the latest beta version(s) from the "daily builds" feed, be prepared spending time on scouring the issue tracker here for comments and discussions relating to the new APIs and studying the source code of the library itself to learn what the new APIs are and how they can be used...
P.S.: I am not involved with the project and not otherwise associated with the project maintainers. I am just a user, and as such i am unable to tell anything about ETAs or the project schedule regarding non-beta release or documentation, unfortunately. :-(
Thanks for the information, I'll stick to my // BUG
and wait for that new API to surface in nuget.org :)
For a command line like so:
app.exe string string string bool
, when you omit thebool
parameter, an exception occurs.It should fail gracefully, telling
Required argument missing for command: 'system'.
instead of crashing.Also, the
bool
argument in usage has extra square brackets which I suppose means it's optional while it isn't in reality.Help for the command:
Invoking it with last
string
missing works fine, tells argument is missing:Invoking it with
bool
argument missing, it crashes:But if one uses
SetDefaultValue
, arguments help is now correct and no more crash:Complete example: