From 694b78920e20a3c97b13a39e65b13c622357d610 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Thu, 5 Sep 2024 20:13:40 +0200 Subject: [PATCH] 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 --- src/west/app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/west/app/main.py b/src/west/app/main.py index 2b4addb..8b848fb 100755 --- a/src/west/app/main.py +++ b/src/west/app/main.py @@ -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))):