diff options
author | wurstsalat <mailtrash@posteo.de> | 2023-06-10 18:16:39 +0300 |
---|---|---|
committer | Daniel Brötzmann <mailtrash@posteo.de> | 2023-09-23 17:52:11 +0300 |
commit | 43f1ac2ca366facc93e870cb7b8a7bd03b4a0fe4 (patch) | |
tree | 3a950be6697eb136a0d1a4c010bcaee19f710f16 /launch.py | |
parent | ce8b9331513bacb6ee7dd06a66ea0f5dd0ab90b7 (diff) |
cfix: Fix git rev-parse when cwd is not gajim directory
Diffstat (limited to 'launch.py')
-rwxr-xr-x | launch.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import os import subprocess import gajim @@ -7,7 +8,12 @@ import gajim.main try: res = subprocess.check_output( - ['git', 'rev-parse', '--short=12', 'HEAD']) # noqa: S603, S607 + ['git', + '-C', + f'{os.path.dirname(__file__)}', + 'rev-parse', + '--short=12', + 'HEAD']) gajim.__version__ += f'+{res.decode().strip()}' except Exception: pass |