diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index bd4c1b34e8..417d3f9084 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -242,32 +242,32 @@ module Homebrew odeprecated "`brew audit --display-failures-only`", "`brew audit ` without the argument" end - # For switches, we add `|| nil` so that `nil` will be passed instead of `false` if they aren't set. - # This way, we can distinguish between "not set" and "set to false". - options = { - audit_download: nil, - # No need for `|| nil` for `--[no-]signing` because boolean switches are already `nil` if not passed - audit_online: (args.online? || nil), - audit_strict: (args.strict? || nil), - audit_signing: args.signing?, - audit_new_cask: (args.new_cask? || nil), - audit_token_conflicts: (args.token_conflicts? || nil), - quarantine: nil, - language: nil, - any_named_args: !no_named_args, - only: args.only, - except: args.except, - }.compact - - options[:quarantine] = true if options[:quarantine].nil? - Homebrew.auditing = true require "cask/auditor" audit_casks.to_h do |cask| odebug "Auditing Cask #{cask}" - [cask.sourcefile_path, { errors: Cask::Auditor.audit(cask, **options), warnings: [] }] + [cask.sourcefile_path, { errors: Cask::Auditor.audit( + cask, + # For switches, we add `|| nil` so that `nil` will be passed + # instead of `false` if they aren't set. + # This way, we can distinguish between "not set" and "set to false". + audit_download: nil, + audit_online: (args.online? || nil), + audit_strict: (args.strict? || nil), + + # No need for `|| nil` for `--[no-]signing` + # because boolean switches are already `nil` if not passed + audit_signing: args.signing?, + audit_new_cask: (args.new_cask? || nil), + audit_token_conflicts: (args.token_conflicts? || nil), + quarantine: true, + language: nil, + any_named_args: !no_named_args, + only: args.only, + except: args.except, + ), warnings: [] }] end end