We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 34cb929 + 3663fd7 commit 6d2451dCopy full SHA for 6d2451d
providers/pip.rb
@@ -131,7 +131,14 @@ def candidate_version
131
end
132
133
def install_package(version)
134
- pip_cmd('install', version == 'latest' ? '' : "==#{version}")
+ # if a version isn't specified (latest), is a source archive (ex. http://my.package.repo/SomePackage-1.0.4.zip),
135
+ # or from a VCS (ex. git+https://git.repo/some_pkg.git) then do not append a version as this will break the source link
136
+ if version == 'latest' || @new_resource.name.downcase.start_with?('http:') || ['git', 'hg', 'svn'].include?(@new_resource.name.downcase.split('+')[0])
137
+ version = ''
138
+ else
139
+ version = "==#{version}"
140
+ end
141
+ pip_cmd('install', version)
142
143
144
def upgrade_package(version)
0 commit comments