From 0e8140b012181413438002b65290c84284721694 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 18 Apr 2016 15:16:43 +0100 Subject: [PATCH] brew.sh: error out if no Ruby found. This is a nicer error message than the `exec` failing at a later stage. --- Library/brew.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/brew.sh b/Library/brew.sh index 3bb15adb42..54f713dd98 100644 --- a/Library/brew.sh +++ b/Library/brew.sh @@ -70,6 +70,10 @@ then HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby" else HOMEBREW_RUBY_PATH="$(which ruby)" + if [[ -z "$HOMEBREW_RUBY_PATH" ]] + then + odie "No Ruby found, cannot proceed." + fi fi fi