From 4b1b02318b459e2916402a984e5c4348ca587adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 5 Jul 2016 13:05:47 +0200 Subject: [PATCH] Explicitly pass the application path to Git. Without this, it doesn't work on our production environment. --- pillar/application/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/application/__init__.py b/pillar/application/__init__.py index aad3a726..58467059 100644 --- a/pillar/application/__init__.py +++ b/pillar/application/__init__.py @@ -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: