diff options
| author | Mike McQuaid | 2014-05-05 13:39:10 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-05-06 16:45:50 +0100 |
| commit | 1b0647d747c457b2faff1df225f9e8701482bcd1 (patch) | |
| tree | d882da2a5cb6e33a5998a66bcc85c15bfdc56b65 /Library/Homebrew | |
| parent | 5955f2a395cf067edf50346e9375701c537d5616 (diff) | |
| download | brew-1b0647d747c457b2faff1df225f9e8701482bcd1.tar.bz2 | |
shared: don't use Formula.factory unnecessarily.
Instead check if the path exists by using opt.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/extend/ENV/shared.rb | 4 |
1 files changed, 1 insertions, 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!" |
