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