Skip to content

Commit

Permalink
Use official? for checking tap.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Sep 5, 2020
1 parent 05cf8f4 commit 6194155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def check_token_bad_words
add_warning "cask token contains .app" if token.end_with? ".app"

if /-(?<designation>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
Expand Down Expand Up @@ -562,7 +562,7 @@ def get_repo_data(regex)
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}"
Expand Down

0 comments on commit 6194155

Please sign in to comment.