From 12f6e871c73c91114bfa017c434f0b25c48156f0 Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Mon, 11 Aug 2025 15:26:44 +1000 Subject: [PATCH] cask/audit: apply suggestion from code review Co-authored-by: Carlo Cabrera --- Library/Homebrew/cask/audit.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 5ffa29c741..108a76b874 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -542,12 +542,14 @@ module Cask true end - if cask.deprecated? && cask.deprecation_reason == :unsigned && !any_signing_failure - add_error <<~EOS - Cask is deprecated as unsigned but all artifacts are signed! - Remove the deprecate/disable stanza or update the deprecate/disable reason. - EOS - end + return if any_signing_failure + return unless cask.deprecated? + return if cask.deprecation_reason != :unsigned + + add_error <<~EOS + Cask is deprecated as unsigned but all artifacts are signed! + Remove the deprecate/disable stanza or update the deprecate/disable reason. + EOS end end