cask/audit: apply suggestion from code review

Co-authored-by: Carlo Cabrera <github@carlo.cab>
This commit is contained in:
Bevan Kay 2025-08-11 15:26:44 +10:00 committed by GitHub
parent 5c06d6f184
commit 12f6e871c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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