From 1b0647d747c457b2faff1df225f9e8701482bcd1 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 5 May 2014 13:39:10 +0100 Subject: shared: don't use Formula.factory unnecessarily. Instead check if the path exists by using opt. --- Library/Homebrew/extend/ENV/shared.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 31904c280..d0102f520 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -98,9 +98,7 @@ module SharedEnvExtension end end elsif ARGV.include? '--use-gcc' - gcc_installed = Formula.factory('apple-gcc42').installed? rescue false - # fall back to something else on systems without Apple gcc - if MacOS.locate('gcc-4.2') || gcc_installed + if MacOS.locate("gcc-4.2") || HOMEBREW_PREFIX.join("opt/apple-gcc42/bin/gcc-4.2").exist? :gcc else raise "gcc-4.2 not found!" -- cgit v1.2.3