From 9dc8ddf0542fa790e4189568dca668f08e62c8cb Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 31 Aug 2013 11:15:19 -0700 Subject: [PATCH] Workaround for debrew See Homebrew/homebrew#21720. --- Library/Homebrew/extend/ENV/super.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 707b753f01..e82f5508e9 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -102,7 +102,11 @@ module Superenv # Homebrew's apple-gcc42 will be outside the PATH in superenv, # so xcrun may not be able to find it if self['HOMEBREW_CC'] == 'gcc-4.2' - apple_gcc42 = Formula.factory('apple-gcc42') rescue nil + apple_gcc42 = begin + Formulary.factory('apple-gcc42') + rescue Exception # in --debug, catch bare exceptions too + nil + end append_path('PATH', apple_gcc42.opt_prefix/'bin') if apple_gcc42 end end