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.
reviewable/pr18780/r1
Jim Patterson 10 years ago
parent cec59726bc
commit 102167f22e

@ -314,7 +314,7 @@ def main():
this_dir = os.path.join(this_dir, chdir) this_dir = os.path.join(this_dir, chdir)
if module.check_mode: 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) module.exit_json(changed=True)
elif name.startswith('svn+') or name.startswith('git+') or \ elif name.startswith('svn+') or name.startswith('git+') or \
name.startswith('hg+') or name.startswith('bzr+'): name.startswith('hg+') or name.startswith('bzr+'):

Loading…
Cancel
Save