From 821d44d8231fb0e58f9e5ec61cac75062896772e Mon Sep 17 00:00:00 2001 From: Chris Griffith Date: Wed, 21 Aug 2024 19:52:46 -0500 Subject: [PATCH] Fix version file --- scripts/get_version.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/get_version.py b/scripts/get_version.py index 3e22fb2b..d6e64425 100644 --- a/scripts/get_version.py +++ b/scripts/get_version.py @@ -18,10 +18,11 @@ def write_and_exit(msg): if __name__ == "__main__": - if sys.argv[1] == "exact": - write_and_exit(__version__) - elif sys.argv[1] == "nsis": - write_and_exit(f"{__version__}.0") + if len(sys.argv) > 1: + if sys.argv[1] == "exact": + write_and_exit(__version__) + elif sys.argv[1] == "nsis": + write_and_exit(f"{__version__}.0") branch = os.getenv("GITHUB_REF").rsplit("/", 1)[1]