aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index c04619798..1b15d9386 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -43,6 +43,10 @@ module Hbc
@stanza = args.shift.to_sym
@format = :to_yaml if yaml?
+
+ unless DSL::DSL_METHODS.include?(stanza)
+ raise ArgumentError, "Illegal stanza: '#{stanza}'"
+ end
end
def run