1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Correct RubyGems bin check on Windows. Bug #5111

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
luislavena 2011-08-01 21:22:13 +00:00
parent 4d9c0998cf
commit 9e49d29e08
3 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Tue Aug 2 06:18:15 2011 Luis Lavena <luislavena@gmail.com>
* lib/rubygems/installer.rb (class Gem): Correct path check on Windows
Possible fix for [Ruby 1.9 - Bug #5111]
* test/rubygems/test_gem_installer.rb (load Gem): ditto
Mon Aug 1 20:12:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_process.rb (TestProcess#windows?): new method.

View file

@ -434,6 +434,7 @@ class Gem::Installer
def check_that_user_bin_dir_is_in_path
user_bin_dir = @bin_dir || Gem.bindir(gem_home)
user_bin_dir.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
unless ENV['PATH'].split(File::PATH_SEPARATOR).include? user_bin_dir then
unless self.class.path_warning then
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run."

View file

@ -208,9 +208,10 @@ load Gem.bin_path('a', 'executable', version)
end
def test_generate_bin_bindir_with_user_install_warning
bin_dir = Gem.win_platform? ? File.expand_path(ENV["WINDIR"]) : "/usr/bin"
options = {
:bin_dir => "/usr/bin",
:bin_dir => bin_dir,
:install_dir => "/non/existant"
}