From 0a0ffd90469bd021c8e1052ab6d43bb6e0fcfee2 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 24 Oct 2024 18:43:15 -0500 Subject: [PATCH] feat: show help on internal cli --- src/swydd/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swydd/__init__.py b/src/swydd/__init__.py index 86a94f5..c277acb 100644 --- a/src/swydd/__init__.py +++ b/src/swydd/__init__.py @@ -623,6 +623,9 @@ def _internal_cli(): parser.add_argument("-V", "--version", help="show version", action="store_true") parser.add_argument("--which", help="show path to swydd", action="store_true") + if len(sys.argv) == 2: + parser.print_help(sys.stderr) + sys.exit(1) args = parser.parse_args(sys.argv[2:]) if args.version: