Move handling to dev-cmd/audit.rb
This commit is contained in:
parent
34204a499b
commit
46f7c8b0b6
@ -27,15 +27,15 @@ module Cask
|
||||
new_cask: nil)
|
||||
|
||||
# `new_cask` implies `online` and `strict`
|
||||
online = new_cask if online.blank?
|
||||
strict = new_cask if strict.blank?
|
||||
online = new_cask if online.nil?
|
||||
strict = new_cask if strict.nil?
|
||||
|
||||
# `online` implies `appcast` and `download`
|
||||
appcast = online if appcast.nil? # `appcast` is `nil` if neither `--appcast` nor `--no-appcast` are passed
|
||||
download = online if download.blank?
|
||||
appcast = online if appcast.nil?
|
||||
download = online if download.nil?
|
||||
|
||||
# `new_cask` implies `token_conflicts`
|
||||
token_conflicts = new_cask if token_conflicts.blank?
|
||||
token_conflicts = new_cask if token_conflicts.nil?
|
||||
|
||||
@cask = cask
|
||||
@appcast = appcast
|
||||
|
||||
@ -206,14 +206,17 @@ module Homebrew
|
||||
require "cask/cmd/abstract_command"
|
||||
require "cask/cmd/audit"
|
||||
|
||||
# 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".
|
||||
Cask::Cmd::Audit.audit_casks(
|
||||
*audit_casks,
|
||||
download: nil,
|
||||
# No need for `|| nil` because this is a `--[no-]appcast` and automatically sets itself to `nil` if not passed
|
||||
appcast: args.appcast?,
|
||||
online: args.online?,
|
||||
strict: args.strict?,
|
||||
new_cask: args.new_cask?,
|
||||
token_conflicts: args.token_conflicts?,
|
||||
online: args.online? || nil,
|
||||
strict: args.strict? || nil,
|
||||
new_cask: args.new_cask? || nil,
|
||||
token_conflicts: args.token_conflicts? || nil,
|
||||
quarantine: nil,
|
||||
any_named_args: !no_named_args,
|
||||
language: nil,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user