Project

General

Profile

Bug #6804 ยป check_that_user_bin_dir_is_in_path.diff

first version of the patch - os97673 (Oleg Sukhodolsky), 07/28/2012 01:22 PM

View differences:

lib/rubygems/installer.rb
434 434

  
435 435
  def check_that_user_bin_dir_is_in_path
436 436
    user_bin_dir = @bin_dir || Gem.bindir(gem_home)
437
    user_bin_dir.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
438
    unless ENV['PATH'].split(File::PATH_SEPARATOR).include? user_bin_dir then
437
    unless ENV['PATH'].split(File::PATH_SEPARATOR).index{|dir| File.identical?(user_bin_dir, dir) } then
439 438
      unless self.class.path_warning then
440 439
        alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t  gem executables will not run."
441 440
        self.class.path_warning = true