diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index 2b22118775c5990d7bf8bea6f0a23e7219dcda2a..73ab121d2dbf0f9c8855ae9cc9f9d9d88c7d20cb 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -152,7 +152,7 @@ module Hbc Hbc.default_tap.install unless Hbc.default_tap.installed? Hbc.init if should_init?(command) run_command(command, *rest) - rescue CaskError, CaskSha256MismatchError => e + rescue CaskError, CaskSha256MismatchError, ArgumentError => e msg = e.message msg << e.backtrace.join("\n") if Hbc.debug onoe msg diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb index 105e946d75e7f92922b0c0d8c03b3de0c8f2fa8f..c54db87957d785f4bbd5e683c900c04ee4cbd473 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb @@ -44,13 +44,15 @@ module Hbc :stage_only, :nested_container, :uninstall, - :postflight, - :uninstall_postflight, :preflight, + :postflight, + :uninstall_preflight, :uninstall_postflight, ] def self.run(*args) + raise ArgumentError, "No stanza given." if args.empty? + table = args.include? "--table" quiet = args.include? "--quiet" format = :to_yaml if args.include? "--yaml"