Merge pull request #2578 from MikeMcQuaid/utils-gem-dir-create

utils: create GEM_HOME when installing Gems.
This commit is contained in:
Mike McQuaid 2017-05-03 09:01:19 +01:00 committed by GitHub
commit 6b005abd6a

View File

@ -189,6 +189,9 @@ 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