fix bug with executables setting their own environment. (#4237)
This commit is contained in:
parent
cafc3cc3ca
commit
3e8662aaa7
@ -130,12 +130,13 @@ def __call__(self, *args, **kwargs):
|
||||
ignore_errors = kwargs.pop("ignore_errors", ())
|
||||
|
||||
# environment
|
||||
env = kwargs.get('env', None)
|
||||
if env is None:
|
||||
env_arg = kwargs.get('env', None)
|
||||
if env_arg is None:
|
||||
env = os.environ.copy()
|
||||
env.update(self.default_env)
|
||||
else:
|
||||
env = self.default_env.copy().update(env)
|
||||
env = self.default_env.copy()
|
||||
env.update(env_arg)
|
||||
|
||||
# TODO: This is deprecated. Remove in a future version.
|
||||
return_output = kwargs.pop("return_output", False)
|
||||
|
Loading…
Reference in New Issue
Block a user