From 06041f7228209d74072d2892ee6d26d71a84e970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fn=20=E2=8C=83=20=E2=8C=A5?= <70830482+FnControlOption@users.noreply.github.com> Date: Wed, 8 Sep 2021 07:24:34 -0700 Subject: [PATCH] install, upgrade: recompute dependencies before installation --- Library/Homebrew/formula_installer.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 1e4cec8999..04375fcbe7 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -358,7 +358,7 @@ class FormulaInstaller raise UnbottledError, [formula] if !pour_bottle? && !formula.bottle_unneeded? && !DevelopmentTools.installed? unless ignore_deps? - deps = compute_dependencies + deps = compute_dependencies(use_cache: false) if ((pour_bottle? && !DevelopmentTools.installed?) || build_bottle?) && (unbottled = unbottled_dependencies(deps)).presence # Check that each dependency in deps has a bottle available, terminating @@ -475,7 +475,8 @@ class FormulaInstaller # Compute and collect the dependencies needed by the formula currently # being installed. - def compute_dependencies + def compute_dependencies(use_cache: true) + @compute_dependencies = nil unless use_cache @compute_dependencies ||= begin check_requirements(expand_requirements) expand_dependencies