extend/kernel: fix error on early deprecations

This commit is contained in:
Bo Anderson 2024-10-16 03:58:05 +01:00
parent 4d4f3a2344
commit aff41779c4
No known key found for this signature in database

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