Merge pull request #15626 from Bo98/audit-skip-taps

dev-cmd/audit: don't audit every tap when given named packages
This commit is contained in:
Mike McQuaid 2023-07-04 16:37:44 +01:00 committed by GitHub
commit 7ba3b5a6f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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