From c6252a7a981120fdbba9c31ae288bd59401879e6 Mon Sep 17 00:00:00 2001 From: Joren Vrancken Date: Sun, 14 Feb 2021 12:23:06 +0100 Subject: [PATCH] Fix environment variable name check in for loop --- src/ansiblelint/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansiblelint/config.py b/src/ansiblelint/config.py index 76cb89ad2c..a0f9313715 100644 --- a/src/ansiblelint/config.py +++ b/src/ansiblelint/config.py @@ -64,7 +64,7 @@ def ansible_collections_path() -> str: """Return collection path variable for current version of Ansible.""" # respect Ansible behavior, which is to load old name if present for env_var in ["ANSIBLE_COLLECTIONS_PATHS", "ANSIBLE_COLLECTIONS_PATH"]: - if "ANSIBLE_COLLECTIONS_PATHS" in os.environ: + if env_var in os.environ: return env_var # https://github.com/ansible/ansible/pull/70007