From 6194155765ab91031efc23cd34b51c263fbffcf3 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 5 Sep 2020 04:13:07 +0200 Subject: [PATCH] Use `official?` for checking tap. --- Library/Homebrew/cask/audit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index ebd9c8035c..5072c0098b 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -395,7 +395,7 @@ module Cask add_warning "cask token contains .app" if token.end_with? ".app" if /-(?alpha|beta|rc|release-candidate)$/ =~ cask.token && - cask.tap.official? && + cask.tap&.official? && cask.tap != "homebrew/cask-versions" add_warning "cask token contains version designation '#{designation}'" end @@ -562,7 +562,7 @@ module Cask end def check_denylist - return if cask.tap&.user != "Homebrew" + return unless cask.tap&.official? return unless reason = Denylist.reason(cask.token) add_error "#{cask.token} is not allowed: #{reason}"