From cc70c2fda3a55fedede92e8fce8354f09eda579c Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 15 May 2020 22:10:40 +0800 Subject: [PATCH] fix: httprunner command --- httprunner/cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/httprunner/cli.py b/httprunner/cli.py index 23c7f1b4..abc2415c 100644 --- a/httprunner/cli.py +++ b/httprunner/cli.py @@ -78,7 +78,13 @@ def main(): sys.exit(0) elif len(sys.argv) == 2: # print help for sub-commands - if sys.argv[1] == "startproject": + if sys.argv[1] in ["-V", "--version"]: + # httprunner -V + print(f"{__version__}") + elif sys.argv[1] in ["-h", "--help"]: + # httprunner -h + parser.print_help() + elif sys.argv[1] == "startproject": # httprunner startproject sub_parser_scaffold.print_help() elif sys.argv[1] == "har2case":