Fix ansible-test env var mixing running commands.

This commit is contained in:
Matt Clay 2019-10-17 13:03:21 -07:00
parent 78eca0eb5d
commit 6be4741f72
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-test now properly uses a fresh copy of environment variables for each command invocation to avoid mixing vars between commands

View file

@ -335,6 +335,8 @@ def intercept_command(args, cmd, target_name, env, capture=False, data=None, cwd
""" """
if not env: if not env:
env = common_environment() env = common_environment()
else:
env = env.copy()
cmd = list(cmd) cmd = list(cmd)
version = python_version or args.python_version version = python_version or args.python_version