On Wed, 21 Jan 2026 12:25:20 +0100
Mauro Carvalho Chehab <[email protected]> wrote:

> 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 <[email protected]>

Reviewed-by: Jonathan Cameron <[email protected]>

> ---
>  scripts/ghes_inject.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/scripts/ghes_inject.py b/scripts/ghes_inject.py
> index 781b37cc68af..4028fdb15582 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__":


Reply via email to