diff --git a/src/websockets/version.py b/src/websockets/version.py index 46ae34a4..d7053c52 100644 --- a/src/websockets/version.py +++ b/src/websockets/version.py @@ -51,7 +51,7 @@ def get_version(tag: str) -> str: try: description = subprocess.run( ["git", "describe", "--dirty", "--tags", "--long"], - capture_output=True, + # capture_output=True, cwd=root_dir, timeout=1, check=True, @@ -63,7 +63,7 @@ def get_version(tag: str) -> str: subprocess.CalledProcessError, subprocess.TimeoutExpired, ): - pass + raise else: description_re = r"[0-9.]+-([0-9]+)-(g[0-9a-f]{7,}(?:-dirty)?)" match = re.fullmatch(description_re, description)