Install bottle deps only when a bottle was poured

Only install the bottle depenencies when a bottle was in fact poured.
In particular, if the dependencies are already satisfied,
then there's no need to install the bottle dependencies.
This commit is contained in:
Shaun Jackman 2019-09-29 23:29:49 -07:00
parent 0b0c619bff
commit 495d2e2870

View File

@ -479,7 +479,6 @@ class FormulaInstaller
dependent, dependent,
inherited_options.fetch(dependent.name, []), inherited_options.fetch(dependent.name, []),
) )
pour_bottle = true if install_bottle_for?(dep.to_formula, build)
if dep.prune_from_option?(build) if dep.prune_from_option?(build)
Dependency.prune Dependency.prune
@ -491,6 +490,8 @@ class FormulaInstaller
Dependency.prune Dependency.prune
elsif dep.satisfied?(inherited_options[dep.name]) elsif dep.satisfied?(inherited_options[dep.name])
Dependency.skip Dependency.skip
else
pour_bottle ||= install_bottle_for?(dep.to_formula, build)
end end
end end