Merge pull request #18580 from Homebrew/opoo-error-fix

extend/kernel: fix error on early deprecations
This commit is contained in:
Bo Anderson 2024-10-16 04:23:11 +01:00 committed by GitHub
commit 43e47abc72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,8 +64,11 @@ module Kernel
# @api public
sig { params(message: T.any(String, Exception)).void }
def opoo(message)
require "utils/github/actions"
return if GitHub::Actions.puts_annotation_if_env_set(:warning, message.to_s)
require "utils/formatter"
Tty.with($stderr) do |stderr|
stderr.puts Formatter.warning(message, label: "Warning")
end