Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2023-06-10 18:16:39 +0300
committerDaniel Brötzmann <mailtrash@posteo.de>2023-09-23 17:52:11 +0300
commit43f1ac2ca366facc93e870cb7b8a7bd03b4a0fe4 (patch)
tree3a950be6697eb136a0d1a4c010bcaee19f710f16 /launch.py
parentce8b9331513bacb6ee7dd06a66ea0f5dd0ab90b7 (diff)
cfix: Fix git rev-parse when cwd is not gajim directory
Diffstat (limited to 'launch.py')
-rwxr-xr-xlaunch.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/launch.py b/launch.py
index 62147b46b..d7e921782 100755
--- a/launch.py
+++ b/launch.py
@@ -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