aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index b0812d27c..411170010 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -71,10 +71,16 @@ module Hbc
next
end
+ if value == nil || (value.kind_of?(Array) && value.empty?)
+ opoo "no such stanza '#{stanza}' on Cask '#{cask}'" unless quiet?
+ puts ""
+ raise ArgumentError, "no such stanza '#{stanza}' on Cask '#{cask}'"
+ end
+
if artifact_name && !value.key?(artifact_name)
opoo "no such stanza '#{artifact_name}' on Cask '#{cask}'" unless quiet?
puts ""
- next
+ raise ArgumentError, "no such stanza '#{artifact_name}' on Cask '#{cask}'"
end
if stanza == :artifacts