1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Correct check mode for pip in virtualenv.

Fix #412.  Check mode was always returning changed=True for pip
when the target was in a virtualenv.  The code now uses the normal
tests for determining if change status.
This commit is contained in:
Jim Patterson 2014-11-30 19:31:09 -05:00 committed by Matt Clay
parent abf314c258
commit 4185ffc43e

View file

@ -320,7 +320,7 @@ def main():
this_dir = os.path.join(this_dir, chdir)
if module.check_mode:
if env or extra_args or requirements or state == 'latest' or not name:
if extra_args or requirements or state == 'latest' or not name:
module.exit_json(changed=True)
elif name.startswith('svn+') or name.startswith('git+') or \
name.startswith('hg+') or name.startswith('bzr+'):