diff --git a/src/ansible_compat/runtime.py b/src/ansible_compat/runtime.py index 9d921587..bbb5a151 100644 --- a/src/ansible_compat/runtime.py +++ b/src/ansible_compat/runtime.py @@ -548,7 +548,7 @@ def install_requirements( # noqa: C901 raise AnsibleCommandError(result) # Run galaxy collection install works on v2 requirements.yml - if "collections" in reqs_yaml: + if "collections" in reqs_yaml and reqs_yaml["collections"] is not None: cmd = [ "ansible-galaxy", "collection",