Merge pull request #8806 from reitermarkus/cask-audit

Allow passing tap to `brew cask audit`.
This commit is contained in:
Markus Reiter 2020-09-25 01:08:17 +02:00 committed by GitHub
commit 9fbe13c17d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,8 +54,19 @@ module Cask
options[:quarantine] = true if options[:quarantine].nil?
failed_casks = casks(alternative: -> { Cask.to_a })
.reject do |cask|
casks = args.named.flat_map do |name|
if File.exist?(name)
name
elsif name.count("/") == 1
Tap.fetch(name).cask_files
else
name
end
end.map(&CaskLoader.public_method(:load))
casks = Cask.to_a if casks.empty?
failed_casks = casks.reject do |cask|
odebug "Auditing Cask #{cask}"
result = Auditor.audit(cask, **options)