Display message when running brew cask _stanza without arguments.
This commit is contained in:
parent
f810bf6bcd
commit
455369b10c
@ -152,7 +152,7 @@ module Hbc
|
|||||||
Hbc.default_tap.install unless Hbc.default_tap.installed?
|
Hbc.default_tap.install unless Hbc.default_tap.installed?
|
||||||
Hbc.init if should_init?(command)
|
Hbc.init if should_init?(command)
|
||||||
run_command(command, *rest)
|
run_command(command, *rest)
|
||||||
rescue CaskError, CaskSha256MismatchError => e
|
rescue CaskError, CaskSha256MismatchError, ArgumentError => e
|
||||||
msg = e.message
|
msg = e.message
|
||||||
msg << e.backtrace.join("\n") if Hbc.debug
|
msg << e.backtrace.join("\n") if Hbc.debug
|
||||||
onoe msg
|
onoe msg
|
||||||
|
|||||||
@ -44,13 +44,15 @@ module Hbc
|
|||||||
:stage_only,
|
:stage_only,
|
||||||
:nested_container,
|
:nested_container,
|
||||||
:uninstall,
|
:uninstall,
|
||||||
:postflight,
|
|
||||||
:uninstall_postflight,
|
|
||||||
:preflight,
|
:preflight,
|
||||||
|
:postflight,
|
||||||
|
:uninstall_preflight,
|
||||||
:uninstall_postflight,
|
:uninstall_postflight,
|
||||||
]
|
]
|
||||||
|
|
||||||
def self.run(*args)
|
def self.run(*args)
|
||||||
|
raise ArgumentError, "No stanza given." if args.empty?
|
||||||
|
|
||||||
table = args.include? "--table"
|
table = args.include? "--table"
|
||||||
quiet = args.include? "--quiet"
|
quiet = args.include? "--quiet"
|
||||||
format = :to_yaml if args.include? "--yaml"
|
format = :to_yaml if args.include? "--yaml"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user