Explicitly pass the application path to Git.

Without this, it doesn't work on our production environment.
This commit is contained in:
Sybren A. Stüvel 2016-07-05 13:05:47 +02:00
parent def1a3d080
commit 4b1b02318b

View File

@ -120,7 +120,7 @@ if app.config['DEBUG']:
# Get the Git hash
try:
git_cmd = ['git', 'describe', '--always']
git_cmd = ['git', '-C', app_root, 'describe', '--always']
description = subprocess.check_output(git_cmd)
app.config['GIT_REVISION'] = description.strip()
except (subprocess.CalledProcessError, OSError) as ex: