-
-
Notifications
You must be signed in to change notification settings - Fork 261
Description
Describe the bug
Whe an app has sub commands like
app
|-> subcommandA
|-> subcommandB
if subcommand A has UnrecognizedArgumentHandling = UnrecognizedArgumentHandling.StopParsingAndCollect
the app will throw and UnrecognizedCommandParsingException when I run app subcommandB --nissingParameter because subcommandB not allow unrecogized aruguments.
To Reproduce
Create the followin structure
app
|-> subcommandA
|-> subcommandB
Set UnrecognizedArgumentHandling = UnrecognizedArgumentHandling.StopParsingAndCollect
to
app, subcommandA and let subcommandB without UnrecognizedArgumentHandling option.
Then run app subcommandA --missingArg
You will see an UnrecognizedCommandParsingException
Expected behavior
With he following app structure:
app
|-> subcommandA
|-> subcommandB
where subcommandA has UnrecognizedArgumentHandling = UnrecognizedArgumentHandling.StopParsingAndCollect
then when a call to
app subcommandA
the app should run the command not mater if subcommandB has not UnrecognizedArgumentHandling
In other words we should not check that if any command nas not UnrecognizedArgumentHandling we should only check if the matching command has the correct UnrecognizedArgumentHandling value