mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Support PATH's using File::ALT_SEPARATOR
in Gem::Installer
Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/710b969b60
This commit is contained in:
parent
04d3e0727a
commit
985309ac38
Notes:
git
2020-07-31 21:08:21 +09:00
2 changed files with 12 additions and 0 deletions
|
@ -707,6 +707,8 @@ class Gem::Installer
|
|||
user_bin_dir = user_bin_dir.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
||||
|
||||
path = ENV['PATH']
|
||||
path = path.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
||||
|
||||
if Gem.win_platform?
|
||||
path = path.downcase
|
||||
user_bin_dir = user_bin_dir.downcase
|
||||
|
|
|
@ -207,6 +207,16 @@ gem 'other', version
|
|||
end
|
||||
|
||||
assert_empty @ui.error
|
||||
|
||||
return unless win_platform?
|
||||
|
||||
ENV['PATH'] = [orig_PATH, bin_dir.tr(File::SEPARATOR, File::ALT_SEPARATOR)].join(File::PATH_SEPARATOR)
|
||||
|
||||
use_ui @ui do
|
||||
installer.check_that_user_bin_dir_is_in_path
|
||||
end
|
||||
|
||||
assert_empty @ui.error
|
||||
ensure
|
||||
ENV['PATH'] = orig_PATH
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue