The first positional argument (command) is mandatory. If not
specified, instead of a simple error message, show help as well.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/ghes_inject.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/ghes_inject.py b/scripts/ghes_inject.py
index 63a8b28002e7..dd2b34a64f15 100755
--- a/scripts/ghes_inject.py
+++ b/scripts/ghes_inject.py
@@ -52,6 +52,9 @@ def main():
if not args.func(args):
sys.exit(1)
else:
+ print("Error: no command specified\n", file=sys.stderr)
+ parser.print_help(file=sys.stderr)
+ print(file=sys.stderr)
sys.exit(f"Please specify a valid command for {sys.argv[0]}")
if __name__ == "__main__":
--
2.52.0