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
In the client we build the whole argparse structure, and do a single parse_args with what is provided in the CLI.
When we removed the customized usage strings from the Client argparse, this particular situation started - when an invalid option is passed, the main pro usage is show in the error message (as this is the parser that is recognizing the wrong option) even when a subcommand is present.
Subcommands have their own parsers and usages, and they should match what we see when a typo happens for instance.
Expected behavior
user@ubuntu-machine:~$ pro config --lolwrong
usage: pro config [-h] {show,set,unset} ...
pro: error: unrecognized arguments: --lolwrong
Current behavior
user@ubuntu-machine:~$ pro config --lolwrong
usage: pro [-h] [--debug] [--version] <command> ...
pro: error: unrecognized arguments: --lolwrong
To Reproduce
Build from the development branch, check scenarios above.
This issue was created from a comment in Pull Request #3206.
The text was updated successfully, but these errors were encountered: