1
0
Fork 0
mirror of synced 2024-11-22 00:05:34 -05:00

Improve output of '--version'

This commit is contained in:
Anish Athalye 2023-07-09 14:51:45 -04:00
parent 53b3781fbb
commit ed60c62432

View file

@ -95,7 +95,7 @@ def main():
["git", "rev-parse", "HEAD"],
cwd=os.path.dirname(os.path.abspath(__file__)),
stderr=devnull,
)
).decode("ascii")
hash_msg = " (git %s)" % git_hash[:10]
except (OSError, subprocess.CalledProcessError):
hash_msg = ""