From 24b190cc14a64f0fde0e6d1b6592850b4964e10d Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 3 May 2017 10:18:07 +0200 Subject: Remove `existing` from PATH when adding `Gem.bindir`. --- Library/Homebrew/utils.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Library/Homebrew/utils.rb') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 59415906d..c37633e41 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -189,14 +189,11 @@ module Homebrew Gem.clear_paths Gem::Specification.reset - # Create GEM_HOME which may not exist yet so it exists when creating PATH. - FileUtils.mkdir_p Gem.bindir - # Add Gem binary directory and (if missing) Ruby binary directory to PATH. path = PATH.new(ENV["PATH"]) path.prepend(RUBY_BIN) if which("ruby") != RUBY_PATH path.prepend(Gem.bindir) - ENV["PATH"] = path.existing + ENV["PATH"] = path if Gem::Specification.find_all_by_name(name, version).empty? ohai "Installing or updating '#{name}' gem" -- cgit v1.2.3