From 95ff7dac86fdc2f14ca8e5925b7aeb3fdd96a27f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 8 Oct 2021 12:04:40 +0800 Subject: [PATCH] lib/tests/formulae: call `install_gcc_if_needed` after installing deps See discussion at https://github.com/Homebrew/homebrew-core/pull/86826. --- lib/tests/formulae.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tests/formulae.rb b/lib/tests/formulae.rb index d758510f..c8b33d53 100644 --- a/lib/tests/formulae.rb +++ b/lib/tests/formulae.rb @@ -285,7 +285,6 @@ def formula!(formula_name, args:) tap_needed_taps(deps) install_ca_certificates_if_needed install_curl_if_needed(formula) - install_gcc_if_needed(formula, deps) install_mercurial_if_needed(deps, reqs) install_subversion_if_needed(deps, reqs) setup_formulae_deps_instances(formula, formula_name, args: args) @@ -304,6 +303,11 @@ def formula!(formula_name, args:) test "brew", "install", "--only-dependencies", *install_args, env: { "HOMEBREW_DEVELOPER" => nil } + # Do this after installing dependencies to avoid skipping formulae + # that build with and declare a dependency on GCC. See discussion at + # https://github.com/Homebrew/homebrew-core/pull/86826 + install_gcc_if_needed(formula, deps) + env = {} env["HOMEBREW_GIT_PATH"] = nil if deps.any? do |d| d.name == "git" && (!d.test? || d.build?)