setup-ruby-path: Ensure that Ruby is installed

Fix the error:
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 372:
exec: : not found
This commit is contained in:
Shaun Jackman 2017-10-17 15:10:04 -07:00
parent cf349018d5
commit 7a0488e803

View File

@ -40,7 +40,7 @@ setup-ruby-path() {
ruby_old_version="$("$HOMEBREW_RUBY_PATH" -rrubygems -e "puts Gem::Version.new('$minimum_ruby_version') > Gem::Version.new(RUBY_VERSION)")"
fi
if [[ "$ruby_old_version" == "true" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" ]]
if [[ -z "$HOMEBREW_RUBY_PATH" || "$ruby_old_version" == "true" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" ]]
then
brew vendor-install ruby
if [[ ! -x "$vendor_ruby_path" ]]