mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
formulary: improve style
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
6141c6a181
commit
69ce5edd14
@ -139,11 +139,12 @@ module Formulary
|
||||
raise new_exception, "", e.backtrace
|
||||
end
|
||||
ensure
|
||||
printed_to_stdout = $stdout.string.strip
|
||||
if printed_to_stdout.present?
|
||||
# TODO: Make printing to stdout an error so that we can print a tap name.
|
||||
# See discussion at https://github.com/Homebrew/brew/pull/20226#discussion_r2195886888
|
||||
if (printed_to_stdout = $stdout.string.strip.presence)
|
||||
opoo <<~WARNING
|
||||
Formula #{name} attempted to print the following while being loaded:
|
||||
#{$stdout.string.strip}
|
||||
#{printed_to_stdout}
|
||||
WARNING
|
||||
end
|
||||
$stdout = old_stdout
|
||||
|
Loading…
x
Reference in New Issue
Block a user