From b73b1edd1b82a45b413aba91f7eed3237b311080 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Aug 2025 14:45:50 +0100 Subject: [PATCH] Fix some test-bot failures/bad output Noticed these when perusing the test-bot output from a third-party tap. --- Library/Homebrew/build.rb | 4 ++-- Library/Homebrew/formulary.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 7827a93609..de47babe8c 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -268,7 +268,7 @@ rescue Exception => e # rubocop:disable Lint/RescueException error_hash["output"] = e.output end - error_pipe.puts error_hash.to_json - error_pipe.close + error_pipe&.puts error_hash.to_json + error_pipe&.close exit! 1 end diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index a101b4d703..1d30222bd5 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -622,7 +622,7 @@ module Formulary if !path_realpath.start_with?("#{HOMEBREW_CELLAR}/", "#{HOMEBREW_LIBRARY}/Taps/", "#{HOMEBREW_CACHE}/") && (path_string.include?("/") || path_string.end_with?(".rb")) raise <<~WARNING - Rejecting formula at #{!path_realpath} because it's not in a tap. + Rejecting formula at #{path_string} because it's not in a tap. Homebrew requires formulae to be in a tap. To create a tap, run e.g.