From db130b65f3acb87a2132b731f52f7a2d38072da0 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 16 Mar 2025 01:54:52 +0100 Subject: [PATCH] Use one regex for gnu.org homepage Co-authored-by: Bo Anderson --- Library/Homebrew/formula_auditor.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 776895aebb..c5ee746e75 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -565,12 +565,7 @@ module Homebrew # Skip gnu.org and nongnu.org audit on GitHub runners # See issue: https://github.com/Homebrew/homebrew-core/issues/206757 - gnu_homepages = [ - %r{https://www\.gnu\.org/.+}, - %r{https://www\.nongnu\.org/.+}, - ] - - return if gnu_homepages.any?(&homepage.method(:match?)) && ENV["HOMEBREW_GITHUB_HOSTED_RUNNER"] + return if homepage.match?(%r{^https?://www\.(?:non)?gnu\.org/.+}) && ENV["HOMEBREW_GITHUB_HOSTED_RUNNER"] use_homebrew_curl = [:stable, :head].any? do |spec_name| next false unless (spec = formula.send(spec_name))