brew.sh: error out if no Ruby found.

This is a nicer error message than the `exec` failing at a later stage.
This commit is contained in:
Mike McQuaid 2016-04-18 15:16:43 +01:00
parent f15b631875
commit 0e8140b012

View File

@ -70,6 +70,10 @@ then
HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby" HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby"
else else
HOMEBREW_RUBY_PATH="$(which ruby)" HOMEBREW_RUBY_PATH="$(which ruby)"
if [[ -z "$HOMEBREW_RUBY_PATH" ]]
then
odie "No Ruby found, cannot proceed."
fi
fi fi
fi fi