Merge pull request #10541 from mistydemeo/fix_ohai_stdout_or_stderr

Utils: fix *_stdout_or_stderr helpers
This commit is contained in:
Misty De Meo 2021-02-05 11:12:54 -08:00 committed by GitHub
commit 214e88aff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,15 +111,16 @@ module Kernel
puts sput
end
def ohai_stdout_or_stderr(message)
def ohai_stdout_or_stderr(message, *sput)
if $stdout.tty?
ohai(message)
ohai(message, *sput)
else
$stderr.puts(ohai_title(message))
$stderr.puts(sput)
end
end
def puts_stdout_or_stderr(message)
def puts_stdout_or_stderr(*message)
if $stdout.tty?
puts(message)
else