From 7cfa544aec72e059d8f6d48ca7d540708a29ad2a Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 4 Apr 2023 17:00:54 +0100 Subject: [PATCH] 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`. --- Library/Homebrew/cask/utils.rb | 2 +- Library/Homebrew/test/cask/dsl_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/utils.rb b/Library/Homebrew/cask/utils.rb index 23e52b91c8..e47510ca3c 100644 --- a/Library/Homebrew/cask/utils.rb +++ b/Library/Homebrew/cask/utils.rb @@ -104,7 +104,7 @@ module Cask message << "during #{section} " if section message << "on Cask #{token}." - opoo "#{message}\n#{error_message_with_suggestions}" + ofail "#{message}\n#{error_message_with_suggestions}" end end end diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb index 106770a4f5..61eadc8fea 100644 --- a/Library/Homebrew/test/cask/dsl_spec.rb +++ b/Library/Homebrew/test/cask/dsl_spec.rb @@ -20,10 +20,10 @@ describe Cask::DSL, :cask do 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) (?m) - Warning: + Error: .* Unexpected method 'future_feature' called on Cask unexpected-method-cask\\. .*