Fix graceful exit on-install for homebrew/rbenv

This commit is contained in:
Henrik Lissner 2014-06-21 05:40:15 -04:00
parent a09b7cd2a2
commit ff8163e072
2 changed files with 5 additions and 3 deletions

View file

@ -8,7 +8,8 @@ module Homebrew
def self.bootstrap def self.bootstrap
unless self.is_installed? unless self.is_installed?
sh_safe 'ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"' sh_safe 'ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"'
sh_safe 'exec $SHELL -l' echo "Homebrew is installed! Restart the shell then rake."
exit
end end
end end

View file

@ -10,7 +10,8 @@ module Rbenv
def self.bootstrap def self.bootstrap
unless self.is_installed? unless self.is_installed?
BREWS.each { |pkg| Homebrew.install pkg } BREWS.each { |pkg| Homebrew.install pkg }
sh_safe 'exec $SHELL -l' echo "Rbenv is installed! Restart the shell then rake."
exit
end end
end end
@ -24,9 +25,9 @@ module Rbenv
def self.install(version, gems=[]) def self.install(version, gems=[])
unless self.is_version_installed?(version) unless self.is_version_installed?(version)
sh_safe "rbenv install #{version}" sh_safe "rbenv install #{version}"
end
sh_safe "RBENV_VERSION=#{version} #{GEM_BIN} install #{gems.join(' ')}" sh_safe "RBENV_VERSION=#{version} #{GEM_BIN} install #{gems.join(' ')}"
end end
end
def self.update(version) def self.update(version)
cmd = self._sudo(version) cmd = self._sudo(version)