From 280fa3ea3820463ae372d748c922825e966d0a2c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:18:00 +0800 Subject: [PATCH] tests/formulae: skip attestation verification when bottle-reinstalling `gh` This should hopefully be the last of these? https://github.com/Homebrew/homebrew-core/actions/runs/11133201051/job/30951261825?pr=192550#step:3:44 Follow-up to #1247 and #1248. --- lib/tests/formulae.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/tests/formulae.rb b/lib/tests/formulae.rb index e5e16c3c..7a00c43e 100644 --- a/lib/tests/formulae.rb +++ b/lib/tests/formulae.rb @@ -297,8 +297,15 @@ def bottle_reinstall_formula(formula, new_formula, args:) @unchanged_dependencies -= @unchanged_build_dependencies end - test "brew", "install", "--only-dependencies", @bottle_filename - test "brew", "install", @bottle_filename + verify_attestations = if formula.name == "gh" + nil + else + ENV.fetch("HOMEBREW_VERIFY_ATTESTATIONS", nil) + end + test "brew", "install", "--only-dependencies", @bottle_filename, + env: { "HOMEBREW_VERIFY_ATTESTATIONS" => verify_attestations } + test "brew", "install", @bottle_filename, + env: { "HOMEBREW_VERIFY_ATTESTATIONS" => verify_attestations } end def build_bottle?(formula, args:)