From fb8b302e323eef666679b5d128efc4f7bbf27cc9 Mon Sep 17 00:00:00 2001 From: Paul Madden Date: Thu, 8 Aug 2024 20:05:37 +0000 Subject: [PATCH] Get program name from sys.argv --- src/uwtools/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uwtools/cli.py b/src/uwtools/cli.py index fd849deeb..ce1941e8d 100644 --- a/src/uwtools/cli.py +++ b/src/uwtools/cli.py @@ -1022,7 +1022,7 @@ def _basic_setup(parser: Parser) -> Group: _switch(STR.version), action=STR.version, help="Show version info and exit", - version=f"%(prog)s {_version()}", + version=f"{Path(sys.argv[0]).name} {_version()}", ) return optional