Skip to content

Commit

Permalink
get_git_status(): PATH environment variable missing.
Browse files Browse the repository at this point in the history
OSError: if git is installed in non standard path
  • Loading branch information
andrejgl committed Jul 9, 2014
1 parent b9478c8 commit c30307a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segments/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c30307a

Please sign in to comment.