Skip to content

Commit

Permalink
Remove (soon to be) obsolete check
Browse files Browse the repository at this point in the history
Fix small typo
  • Loading branch information
Git-Jiro committed Nov 10, 2017
1 parent fea5350 commit 17e001b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def initialize(*)
raise ArgumentError,
<<~EOS
Unknown/unsupported stanza: '#{stanza}'
Check cask reference for supported stanzas.
Check Cask reference for supported stanzas.
EOS
end

Expand All @@ -74,8 +74,7 @@ def run
value = value[artifact_name] if artifact_name
end

if value.nil? || (value.respond_to?(:to_a) && value.to_a.empty?) ||
(value.respond_to?(:to_s) && value.to_s == "{}")
if value.nil? || (value.respond_to?(:to_a) && value.to_a.empty?)
stanza_name = artifact_name ? artifact_name : stanza
raise CaskError, "no such stanza '#{stanza_name}' on Cask '#{cask}'"
end
Expand Down

0 comments on commit 17e001b

Please sign in to comment.