Patch environment for VCS rather than creating new one

Closes #240
This commit is contained in:
Buck Ryan 2018-02-22 10:23:23 -05:00
parent a494cd4a45
commit b07c8ef4cb
6 changed files with 20 additions and 9 deletions

View file

@ -1,5 +1,9 @@
# Changes
Unreleased
* Patch environment for VCS subprocesses rather than generating a new one
2018-02-19 (version 0.4.9)
* Fix root user segment

View file

@ -11,7 +11,9 @@ def get_PATH():
def bzr_subprocess_env():
return {"PATH": get_PATH()}
env = dict(os.environ)
env.update({"PATH": get_PATH()})
return env
def _get_bzr_branch():

View file

@ -11,7 +11,9 @@ def get_PATH():
def fossil_subprocess_env():
return {"PATH": get_PATH()}
env = dict(os.environ)
env.update({"PATH": get_PATH()})
return env
def _get_fossil_branch():

View file

@ -12,17 +12,16 @@ def get_PATH():
def git_subprocess_env():
return {
env = dict(os.environ)
env.update({
# LANG is specified to ensure git always uses a language we are expecting.
# Otherwise we may be unable to parse the output.
"LANG": "C",
# https://github.com/milkbikis/powerline-shell/pull/126
"HOME": os.getenv("HOME"),
# https://github.com/milkbikis/powerline-shell/pull/153
"PATH": get_PATH(),
}
})
return env
def parse_git_branch_info(status):

View file

@ -11,7 +11,9 @@ def get_PATH():
def hg_subprocess_env():
return {"PATH": get_PATH()}
env = dict(os.environ)
env.update({"PATH": get_PATH()})
return env
def _get_hg_branch():

View file

@ -10,7 +10,9 @@ def get_PATH():
def svn_subprocess_env():
return {"PATH": get_PATH()}
env = dict(os.environ)
env.update({"PATH": get_PATH()})
return env
def _get_svn_revision():