Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked frompoise/python

Commitb9c79a8

Browse files
author
Joshua Timberman
committed
Merge pull requestpoise#45 from e100/fix_pip_name
Allow name and package_name to be different to avoid CHEF-3694 warnings
2 parentscd033e5 +6519292 commitb9c79a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎providers/pip.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def candidate_version
131131
definstall_package(version)
132132
# if a version isn't specified (latest), is a source archive (ex. http://my.package.repo/SomePackage-1.0.4.zip),
133133
# 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
134-
ifversion =='latest' ||new_resource.name.downcase.start_with?('http:','https:') ||['git','hg','svn'].include?(new_resource.name.downcase.split('+')[0])
134+
ifversion =='latest' ||new_resource.package_name.downcase.start_with?('http:','https:') ||['git','hg','svn'].include?(new_resource.package_name.downcase.split('+')[0])
135135
version=''
136136
else
137137
version="==#{version}"
@@ -152,7 +152,7 @@ def remove_package(version)
152152
defpip_cmd(subcommand,version='')
153153
options={:timeout=>new_resource.timeout,:user=>new_resource.user,:group=>new_resource.group}
154154
options[:environment]={'HOME'=> ::File.expand_path("~#{new_resource.user}")}ifnew_resource.user
155-
shell_out!("#{which_pip(new_resource)}#{subcommand}#{new_resource.options}#{new_resource.name}#{version}",options)
155+
shell_out!("#{which_pip(new_resource)}#{subcommand}#{new_resource.options}#{new_resource.package_name}#{version}",options)
156156
end
157157

158158
# TODO remove when provider is moved into Chef core

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp