From f0c4dace8d4bd6d713e9b9aff308301a22922149 Mon Sep 17 00:00:00 2001 From: Richard C Isaacson Date: Wed, 29 Jan 2014 13:09:58 -0600 Subject: [PATCH] If a executable is defined but not found the module should fail. Addresses https://github.com/ansible/ansible/issues/5781. --- library/packaging/pip | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/packaging/pip b/library/packaging/pip index 56775177ded..666172cc0e0 100644 --- a/library/packaging/pip +++ b/library/packaging/pip @@ -175,7 +175,8 @@ def _get_pip(module, env=None, executable=None): if os.path.isabs(executable): pip = executable else: - candidate_pip_basenames.insert(0, executable) + # If you define your own executable that executable should be the only candidate. + candidate_pip_basenames = [executable] if pip is None: if env is None: opt_dirs = []