From ab24dd724b29b9422e3429b1ad0bb12ae8810235 Mon Sep 17 00:00:00 2001 From: Alec Clowes Date: Wed, 22 Jan 2014 08:32:27 -0700 Subject: [PATCH] [COOK-4244] Fix the pip version_check_cmd to use the virtualenv pip when applicable. Otherwise when upgrading the pip in your virtualenv, it will incorrectly get the system pip version and may skip the upgrade. --- providers/pip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/pip.rb b/providers/pip.rb index 268524c..237cc75 100644 --- a/providers/pip.rb +++ b/providers/pip.rb @@ -112,7 +112,7 @@ def current_installed_version # incase you upgrade pip with pip! if new_resource.package_name.eql?('pip') delimeter = /\s/ - version_check_cmd = "pip --version" + version_check_cmd = "#{which_pip(@new_resource)} --version" end result = shell_out(version_check_cmd) (result.exitstatus == 0) ? result.stdout.split(delimeter)[1].strip : nil