mirror of https://github.com/zulip/zulip.git
try_git_describe: Set cwd, not --git-dir.
git describe --dirty requires a working tree, not just a repository. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
9962377018
commit
88e90d34b9
|
@ -18,10 +18,9 @@ from version import ZULIP_VERSION
|
|||
def try_git_describe() -> Optional[str]:
|
||||
try: # nocoverage
|
||||
return subprocess.check_output(
|
||||
['git',
|
||||
'--git-dir', os.path.join(os.path.dirname(__file__), '../.git'),
|
||||
'describe', '--tags', '--always', '--dirty', '--long'],
|
||||
['git', 'describe', '--tags', '--always', '--dirty', '--long'],
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=os.path.join(os.path.dirname(__file__), '..'),
|
||||
).strip().decode('utf-8')
|
||||
except Exception: # nocoverage
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue