aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-05-03 11:37:18 +0100
committerGitHub2017-05-03 11:37:18 +0100
commita25cd9d8baf3e40d0dad155c27565e602ebb5a64 (patch)
treef7851af3926d8fa7e976a036f04d86a4372330f1 /Library/Homebrew/utils.rb
parent555505ec5458b1f2c594fc847074289745029dad (diff)
parent24b190cc14a64f0fde0e6d1b6592850b4964e10d (diff)
downloadbrew-a25cd9d8baf3e40d0dad155c27565e602ebb5a64.tar.bz2
Merge pull request #2580 from reitermarkus/gem-path
Remove `existing` from PATH when adding `Gem.bindir`.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb5
1 files changed, 1 insertions, 4 deletions
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"