Closed
Description
The current implementation of Command.AddGlobalOption
sets Option.IsGlobal
, which can result in an unintended behavior when an option is used in more than one command and is intended to be global in one case but not in another.
In the following example, the second parse should result in a parse error because option
was not added globally to childCommand2
, but there is no parse error because AddGlobalOption
was called on the same option. This bug will manifest regardless of the call order.