From 5b7e27f9fd5f21da2ee5ed484353640f83978a79 Mon Sep 17 00:00:00 2001 From: Reuben Dunnington Date: Sat, 16 Sep 2023 09:59:02 -0700 Subject: [PATCH] running orca with no args should print help instead of throw an error --- scripts/orca.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/orca.py b/scripts/orca.py index 6b67877..f8e8a3f 100644 --- a/scripts/orca.py +++ b/scripts/orca.py @@ -21,7 +21,10 @@ attach_version_command(subparsers) # Using argparse action="version" requires us to pass a single string # and doesn't allow us to run our own custom version-printing function. argv = sys.argv[1:] -if argv[0] in ["-v", "--version"]: + +if len(argv) == 0: + argv = ["-h"] +elif argv[0] in ["-v", "--version"]: argv = ["version"] args = parser.parse_args(argv) -- 2.25.1