aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index bce5db3e1..b5df67b0f 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -45,7 +45,8 @@ module Hbc
@format = :to_yaml if yaml?
return if DSL::DSL_METHODS.include?(stanza)
- raise ArgumentError, "Illegal stanza: '#{stanza}'"
+ raise ArgumentError,
+ "Unknown/unsupported stanza: '#{stanza}' Check cask reference for supported stanzas."
end
def run
@@ -72,7 +73,8 @@ module Hbc
if value.nil? || (value.respond_to?(:to_a) && value.to_a.empty?) ||
(value.respond_to?(:to_s) && value.to_s == "{}")
- raise CaskError, "no such stanza '#{artifact_name ? artifact_name : stanza}' on Cask '#{cask}'"
+ stanza_name = artifact_name ? artifact_name : stanza
+ raise CaskError, "no such stanza '#{stanza_name}' on Cask '#{cask}'"
end
if format