diff options
author | Matt Clay <matt@mystile.com> | 2019-10-17 22:03:21 +0200 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2019-10-18 02:40:34 +0200 |
commit | 6be4741f722eb2d12c12bd35b16d57e3bc5410e4 (patch) | |
tree | 8d52deded8e4a3180a1c6c4b108473158e5031d6 | |
parent | Fix SSL protocol references in mqtt module. (diff) | |
download | ansible-6be4741f722eb2d12c12bd35b16d57e3bc5410e4.tar.xz ansible-6be4741f722eb2d12c12bd35b16d57e3bc5410e4.zip |
Fix ansible-test env var mixing running commands.
-rw-r--r-- | changelogs/fragments/ansible-test-env-alteration.yml | 2 | ||||
-rw-r--r-- | test/lib/ansible_test/_internal/util_common.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/changelogs/fragments/ansible-test-env-alteration.yml b/changelogs/fragments/ansible-test-env-alteration.yml new file mode 100644 index 0000000000..2bd28d0d31 --- /dev/null +++ b/changelogs/fragments/ansible-test-env-alteration.yml @@ -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 diff --git a/test/lib/ansible_test/_internal/util_common.py b/test/lib/ansible_test/_internal/util_common.py index f4035ee934..5be20ee749 100644 --- a/test/lib/ansible_test/_internal/util_common.py +++ b/test/lib/ansible_test/_internal/util_common.py @@ -335,6 +335,8 @@ def intercept_command(args, cmd, target_name, env, capture=False, data=None, cwd """ if not env: env = common_environment() + else: + env = env.copy() cmd = list(cmd) version = python_version or args.python_version |