From ecf5772e86fabbf7eeae8dbd30743bcabb5c128c Mon Sep 17 00:00:00 2001 From: Marshall Hallenbeck Date: Mon, 1 Apr 2024 14:17:51 -0400 Subject: [PATCH] fix: attempt to split version, and if it fails, then fallback to normal versioning (only happens with poetry) --- nxc/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nxc/cli.py b/nxc/cli.py index 6fa037b2..f39e670e 100755 --- a/nxc/cli.py +++ b/nxc/cli.py @@ -14,7 +14,11 @@ import importlib.metadata def gen_cli_args(): - VERSION, COMMIT = importlib.metadata.version("netexec").split("+") + try: + VERSION, COMMIT = importlib.metadata.version("netexec").split("+") + except ValueError: + VERSION = importlib.metadata.version("netexec") + COMMIT = "" CODENAME = "nxc4u"