Show help when running multi-commands without a subcommand.
Review Request #15300 — Created Sept. 14, 2026 and submitted — Latest diff uploaded
Running a multi-command like
rbt reviewwith no subcommand crashed
with a TypeError. The subparsers were not marked as required, so argparse
accepted the empty command line and leftoptions.argsas None.Multi-commands now print their help text and exit with status 1 when run
without any arguments, similar togit. The subparsers are also marked
as required, so other invalid invocations (such asrbt review --foo)
show a usage error instead of crashing. They use a<subcommand>metavar
to keep the error and help output readable.
- Ran unit tests.
- Ran
rbt reviewand saw useful help output instead of a crash.