diff --git a/build_utils/version.py b/build_utils/version.py index 90a0a609a..fcf305c47 100644 --- a/build_utils/version.py +++ b/build_utils/version.py @@ -42,7 +42,7 @@ print(f"Trying {gitcmd} ...", file=sys.stderr) proc = subprocess.run([gitcmd, "describe", "--tags", "--dirty"], capture_output=True, check=True, text=True) - except subprocess.CalledProcessError as err: + except (subprocess.CalledProcessError, FileNotFoundError) as err: print(f"Tried {gitcmd}, returned: {err}", file=sys.stderr) print(f"Stdout: '{err.stdout.strip()}'", file=sys.stderr) print(f"Stderr: '{err.stderr.strip()}'", file=sys.stderr)