⚗️ Try to fix the build error in CI

This commit is contained in:
Gina Häußge committed 2023-10-10 17:35:19 +02:00
1 parent 579bfccb2c
commit 4e00d20f3e
1 file changed
+5 -2
+5 -2
View File
@@ -149,9 +149,12 @@ def _get_dirty():
def _get_distance(ref):
distance = _git("rev-list", f"{ref}..HEAD", "--count")
if distance is None:
return None
try:
return int(_git("rev-list", "--count", "HEAD", f"^{ref}"))
except ValueError:
return int(distance)
except Exception:
return None