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
If you create a command with an option and its arity is ExactlyOne it will not be validated if the option isn't supplied in the arguments.
For example:
varcommand=newCommand("team"){newOption("--sport",argument:newArgument<string>{Arity=ArgumentArity.ExactlyOne})};command.Handler=CommandHandler.Create(async(stringsport)=>{// sport is null
...}
If you call the application with myapp team there is no validation performed against --sport so it can slip through as null in the handler.
If supplied i.e. myapp team --sport then you get validation:
Required argument missing for option: --sport
yarseyah, israelvaldez, johncrim and Trolldemorted