From b2dff27f0c8d0a4dc7190f657a4e516df86ae75e Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Wed, 6 Nov 2024 10:22:47 +1100 Subject: [PATCH 1/2] tap: allow an array of values for an audit exception --- Library/Homebrew/tap.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index ed67a2a06632f..74b9014f6f256 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -1116,6 +1116,8 @@ def audit_exception(list, formula_or_cask, value = nil) return false unless list.include? formula_or_cask return list[formula_or_cask] if value.blank? + return list[formula_or_cask].include? value if list[formula_or_cask].is_a? Array + list[formula_or_cask] == value end end From ffd9d686cb0b0ef1e6dc3a0774a3b72a53126179 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 6 Nov 2024 09:11:33 +0000 Subject: [PATCH 2/2] tap: tweak Ruby style for readability. --- Library/Homebrew/tap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 74b9014f6f256..d8605c280a03e 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -1116,7 +1116,7 @@ def audit_exception(list, formula_or_cask, value = nil) return false unless list.include? formula_or_cask return list[formula_or_cask] if value.blank? - return list[formula_or_cask].include? value if list[formula_or_cask].is_a? Array + return list[formula_or_cask].include?(value) if list[formula_or_cask].is_a?(Array) list[formula_or_cask] == value end