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

Commit6e0afef

Browse files
committed
Slight cleanup for env code.
1 parent591ba73 commit6e0afef

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
@@ -152,8 +152,8 @@ def remove_package(version)
152152
defpip_cmd(subcommand,version='')
153153
options={:timeout=>new_resource.timeout,:user=>new_resource.user,:group=>new_resource.group}
154154
environment=Hash.new
155-
environment.merge!({'HOME'=> ::File.expand_path("~#{new_resource.user}")})ifnew_resource.user
156-
environment.merge!(new_resource.environment)ifnew_resource.environment
155+
environment['HOME']=Dir.home(new_resource.user)ifnew_resource.user
156+
environment.merge!(new_resource.environment)ifnew_resource.environment && !new_resource.environment.empty?
157157
options[:environment]=environment
158158
shell_out!("#{which_pip(new_resource)}#{subcommand}#{new_resource.options}#{new_resource.package_name}#{version}",options)
159159
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp