Make the environment a setting

This would allow other rules to set the environment as needed for
`@git_support` and `GIT_TRACE`.
This commit is contained in:
mcarton
2015-07-17 00:09:33 +02:00
parent b3e09d68df
commit 707d91200e
3 changed files with 12 additions and 7 deletions
+6 -2
View File
@@ -81,8 +81,12 @@ def get_command(settings, args):
script = shells.from_shell(script)
logs.debug('Call: {}'.format(script), settings)
result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE,
env=dict(os.environ, LANG='C', GIT_TRACE=1))
env = dict(os.environ)
env.update(settings.env)
logs.debug('Executing with env: {}'.format(env), settings)
result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE, env=env)
if wait_output(settings, result):
return types.Command(script, result.stdout.read().decode('utf-8'),
result.stderr.read().decode('utf-8'))