From c30307ae72f4df2c3c8212381d3e0b34db743303 Mon Sep 17 00:00:00 2001 From: andrejgl Date: Wed, 9 Jul 2014 23:59:16 +0300 Subject: [PATCH] get_git_status(): PATH environment variable missing. OSError: if git is installed in non standard path --- segments/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segments/git.py b/segments/git.py index 230499f..0aedfcb 100644 --- a/segments/git.py +++ b/segments/git.py @@ -6,7 +6,7 @@ def get_git_status(): has_untracked_files = False origin_position = "" output = subprocess.Popen(['git', 'status', '--ignore-submodules'], - env={"LANG": "C", "HOME": os.getenv("HOME")}, stdout=subprocess.PIPE).communicate()[0] + env={"LANG": "C", "HOME": os.getenv("HOME"), "PATH": os.getenv("PATH")}, stdout=subprocess.PIPE).communicate()[0] for line in output.split('\n'): origin_status = re.findall( r"Your branch is (ahead|behind).*?(\d+) comm", line)