Skip to content

Commit e4c0197

Browse files
lukeseawalkertilne
authored andcommitted
Allow pip upgrade
Don't skip installation if upgrade flag is provided but version it's not PR reported in sous-chefs/pyenv#78 Signed-off-by: Luca Carrogu <[email protected]>
1 parent b8a1148 commit e4c0197

File tree

1 file changed

+4
-2
lines changed
  • third-party/pyenv-3.1.1/resources

1 file changed

+4
-2
lines changed

third-party/pyenv-3.1.1/resources/pip.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ def require_install?
9898
end
9999

100100
unless new_resource.version
101-
Chef::Log.debug("already installed: #{new_resource.package_name} #{current_version}")
102-
return false
101+
unless new_resource.options.split(/\s+/).include? '--upgrade'
102+
Chef::Log.debug("already installed: #{new_resource.package_name} #{current_version}")
103+
return false
104+
end
103105
end
104106

105107
if current_version != new_resource.version

0 commit comments

Comments
 (0)