From d067928a4e3e307c7d4bf463f57caf93dc4083f3 Mon Sep 17 00:00:00 2001 From: Qixiang Wan Date: Tue, 25 Oct 2016 15:45:57 +0800 Subject: [PATCH] not using 'git -C path' which is not supported by git 1.x '-C path' is new in git 2.x and RHEL 6 has git 1.8 by default Signed-off-by: Qixiang Wan --- pungi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pungi/__init__.py b/pungi/__init__.py index 328c61b8..db0fd19c 100644 --- a/pungi/__init__.py +++ b/pungi/__init__.py @@ -12,7 +12,7 @@ def get_full_version(): location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') if os.path.isdir(os.path.join(location, '.git')): import subprocess - proc = subprocess.Popen(['git', '-C', location, 'describe', '--tags'], + proc = subprocess.Popen(['git', '--git-dir=%s/.git' % location, 'describe', '--tags'], stdout=subprocess.PIPE) output, _ = proc.communicate() return re.sub(r'-1.fc\d\d?', '', output.strip().replace('pungi-', ''))