shared: don't use Formula.factory unnecessarily.
Instead check if the path exists by using opt.
This commit is contained in:
parent
5955f2a395
commit
1b0647d747
@ -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!"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user