diff options
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index cafee2025..c7e61e379 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -119,6 +119,14 @@ module Homebrew def self.git_last_commit HOMEBREW_REPOSITORY.cd { `git show -s --format="%cr" HEAD 2>/dev/null`.chuzzle } end + + def self.install_gem_setup_path! gem + return if quiet_system "gem", "list", "--installed", gem + system "gem", "install", "--no-ri", "--no-rdoc", + "--user-install", gem + require "rubygems" + ENV["PATH"] = "#{Gem.user_dir}/bin:#{ENV["PATH"]}" + end end def with_system_path |
