diff options
| author | Mike McQuaid | 2014-05-05 13:39:10 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-05-06 16:45:50 +0100 |
| commit | 0cea93702317ac93b1413690c3742eea5c92c021 (patch) | |
| tree | f8a6f39fca7dbfa38b54b171bb764fc39396093b /Library | |
| parent | d970b87c15ff1a346e15800d93e7862f4f8bdca7 (diff) | |
| download | homebrew-0cea93702317ac93b1413690c3742eea5c92c021.tar.bz2 | |
shared: don't use Formula.factory unnecessarily.
Instead check if the path exists by using opt.
Diffstat (limited to 'Library')
| -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!" |
