From 57d7d4c9dd13fe5c4c17ac29ff7b3b093b03eadf Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 23 Jan 2019 15:40:44 +0000 Subject: [PATCH] brew.rb: duplicate MissingEnvironmentVariables exception. Fixes #5592. --- Library/Homebrew/brew.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index 8124cd02cf..c3e7d9aa5c 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -10,6 +10,9 @@ if RUBY_X < 2 || (RUBY_X == 2 && RUBY_Y < 3) raise "Homebrew must be run under Ruby 2.3! You're running #{RUBY_VERSION}." end +# Also define here so we can rescue regardless of location. +class MissingEnvironmentVariables < RuntimeError; end + begin require_relative "global" rescue MissingEnvironmentVariables => e