Skip to content

Commit

Permalink
Revert to previous behavior for ansible_collections_path (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
audgirka committed May 4, 2023
1 parent ff385f6 commit 9b4314f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ansible_compat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
# do not use lru_cache here, as environment can change between calls
def ansible_collections_path() -> str:
"""Return collection path variable for current version of Ansible."""
for env_var in [
"ANSIBLE_COLLECTIONS_PATH",
"ANSIBLE_COLLECTIONS_PATHS",
]:
if env_var in os.environ:
return env_var
return "ANSIBLE_COLLECTIONS_PATH"


Expand Down

0 comments on commit 9b4314f

Please sign in to comment.