dev-cmd/audit: don't audit every tap with given named packages

This commit is contained in:
Bo Anderson 2023-07-04 16:08:04 +01:00
parent a5a728a4df
commit 367f716a08
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
2 changed files with 4 additions and 2 deletions

View File

@ -174,8 +174,10 @@ module Homebrew
end
# Run tap audits first
named_arg_taps = [*audit_formulae, *audit_casks].map(&:tap).uniq if !args.tap && !no_named_args
tap_problems = Tap.each_with_object({}) do |tap, problems|
next if args.tap && tap != args.tap
next if named_arg_taps&.exclude?(tap)
ta = TapAuditor.new(tap, strict: args.strict?)
ta.audit

View File

@ -227,9 +227,9 @@ module Homebrew
if args.no_audit?
ohai "Skipping `brew audit`"
elsif args.online?
ohai "brew audit --cask --online #{cask.sourcefile_path.basename}"
ohai "brew audit --cask --online #{cask.full_name}"
else
ohai "brew audit --cask #{cask.sourcefile_path.basename}"
ohai "brew audit --cask #{cask.full_name}"
end
return
end