Skip to content
Snippets Groups Projects
Commit 87e77350 authored by Jack Nagel's avatar Jack Nagel
Browse files

Ask the formula object for the opt path

parent 7a75bbd8
No related branches found
No related tags found
No related merge requests found
......@@ -192,8 +192,9 @@ module SharedEnvExtension
version = name[GNU_GCC_REGEXP, 1]
gcc_version_name = "gcc#{version.delete('.')}"
if HOMEBREW_PREFIX.join("opt", "gcc", "bin", name).exist?
Formulary.factory("gcc")
gcc = Formulary.factory("gcc")
if gcc.opt_bin.join(name).exist?
gcc
else
Formulary.factory(gcc_version_name)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment