os/mac: don't use Formula.factory unnecessarily.
Instead check if the path exists by using opt.
This commit is contained in:
parent
4f466b6c10
commit
5955f2a395
@ -121,7 +121,7 @@ module OS
|
||||
end
|
||||
|
||||
def non_apple_gcc_version(cc)
|
||||
path = Formula.factory("gcc").opt_prefix/"bin/#{cc}"
|
||||
path = HOMEBREW_PREFIX.join("opt/gcc/bin/#{cc}")
|
||||
path = nil unless path.exist?
|
||||
|
||||
return unless path ||= locate(cc)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user