Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Commit 4486807

Browse files
committed
Merge pull request #1 from lastobelus/COOK-1472
fixes COOK-1472 python_pip[virtualenv] fails in chef 10.12.0
2 parents b5d0065 + 4c2e7d7 commit 4486807

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

providers/pip.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ def current_installed_version
124124
delimeter = /\s/
125125
version_check_cmd = "pip --version"
126126
end
127-
p = shell_out!(version_check_cmd)
128-
p.stdout.split(delimeter)[1].strip
127+
p = shell_out(version_check_cmd)
128+
unless p.stdout.split(delimeter).count < 2
129+
p.stdout.split(delimeter)[1].strip
130+
end
129131
rescue Chef::Exceptions::ShellCommandFailed, Mixlib::ShellOut::ShellCommandFailed
130132
end
131133
end

0 commit comments

Comments
 (0)