Open
Description
Someone was recently asked to type this command:
rush --debug update -p --full
...but they accidentally typed this:
rush update -p --full --debug
Expected: According to the design of ts-command-line, this should have reported an error, since --debug
is a global option, NOT an option of the rush update
subcommand.
What actually happens: Instead, the command silently succeeds, but confusingly behaves as if this was typed:
rush update -p --full --debug-package-manager
The reason is that argparse has an obscure feature that allows any option to be shortened (e.g. --debug-pac
instead of --debug-package-manager
), as long as it doesn't cause ambiguity. But this convenience only looks for ambiguity within a single parser block.
Metadata
Metadata
Assignees
Type
Projects
Status
Needs triage