cask/utils: Make more noise when encountering undefined methods
- https://github.com/Homebrew/homebrew-cask/actions/runs/4608585102/jobs/8144571098 introduced syntax errors for the `mattermost` cask (`autoupdates` instead of `auto_updates`), but CI didn't fail so we didn't notice until it shipped to users and broke `brew update`.
This commit is contained in:
parent
41e7ee7b51
commit
7cfa544aec
@ -104,7 +104,7 @@ module Cask
|
|||||||
message << "during #{section} " if section
|
message << "during #{section} " if section
|
||||||
message << "on Cask #{token}."
|
message << "on Cask #{token}."
|
||||||
|
|
||||||
opoo "#{message}\n#{error_message_with_suggestions}"
|
ofail "#{message}\n#{error_message_with_suggestions}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -20,10 +20,10 @@ describe Cask::DSL, :cask do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "prints a warning that it has encountered an unexpected method" do
|
it "prints an error that it has encountered an unexpected method" do
|
||||||
expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join)
|
expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join)
|
||||||
(?m)
|
(?m)
|
||||||
Warning:
|
Error:
|
||||||
.*
|
.*
|
||||||
Unexpected method 'future_feature' called on Cask unexpected-method-cask\\.
|
Unexpected method 'future_feature' called on Cask unexpected-method-cask\\.
|
||||||
.*
|
.*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user