app: Skip handling an unknown command if -h is passed

Let the builtin help command handle the passed arguments.

Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com>
This commit is contained in:
Pieter De Gendt 2024-09-05 20:13:40 +02:00 committed by Marc Herbert
parent ab31960df4
commit 694b78920e
1 changed files with 1 additions and 1 deletions

View File

@ -578,7 +578,7 @@ class WestApp:
# gracefully. This provides more user-friendly output than
# argparse can do on its own.
if (early_args.command_name and
if (early_args.command_name and not early_args.help and
(early_args.command_name not in self.builtins and
(not self.extensions or
early_args.command_name not in self.extensions))):