From 495d2e28702c699cf3048760a107dd0e5694c050 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 29 Sep 2019 23:29:49 -0700 Subject: [PATCH] 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. --- Library/Homebrew/formula_installer.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 023fca479d..90b431735c 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -479,7 +479,6 @@ class FormulaInstaller dependent, inherited_options.fetch(dependent.name, []), ) - pour_bottle = true if install_bottle_for?(dep.to_formula, build) if dep.prune_from_option?(build) Dependency.prune @@ -491,6 +490,8 @@ class FormulaInstaller Dependency.prune elsif dep.satisfied?(inherited_options[dep.name]) Dependency.skip + else + pour_bottle ||= install_bottle_for?(dep.to_formula, build) end end