Skip to content

Commit

Permalink
Backport fix of test failure on Windows
Browse files Browse the repository at this point in the history
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller) fails
on Windows with msys bash. It makes comparing paths case-insensitive.

See:
#299 (comment)
  • Loading branch information
shirosaki authored and luislavena committed Jun 24, 2012
1 parent 314d038 commit c474edb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/rubygems/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,13 @@ def process_options
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
path = ENV['PATH']
if Gem.win_platform? then
path = path.downcase
user_bin_dir = user_bin_dir.downcase
end

unless 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."
self.class.path_warning = true
Expand Down

0 comments on commit c474edb

Please sign in to comment.