Ask the formula object for the opt path
This commit is contained in:
parent
7a75bbd85a
commit
87e7735012
@ -192,8 +192,9 @@ module SharedEnvExtension
|
|||||||
version = name[GNU_GCC_REGEXP, 1]
|
version = name[GNU_GCC_REGEXP, 1]
|
||||||
gcc_version_name = "gcc#{version.delete('.')}"
|
gcc_version_name = "gcc#{version.delete('.')}"
|
||||||
|
|
||||||
if HOMEBREW_PREFIX.join("opt", "gcc", "bin", name).exist?
|
gcc = Formulary.factory("gcc")
|
||||||
Formulary.factory("gcc")
|
if gcc.opt_bin.join(name).exist?
|
||||||
|
gcc
|
||||||
else
|
else
|
||||||
Formulary.factory(gcc_version_name)
|
Formulary.factory(gcc_version_name)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user