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:
+6
-2
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user