onoe and opoo print to stderr

This may result in some undesired output for things that suppress
stdout, but we'll fix those as we go.

Fixes Homebrew/homebrew#18650.
This commit is contained in:
Jack Nagel 2013-03-31 15:18:47 -05:00
parent 7af5a74c4e
commit ba202df70b

View File

@ -50,13 +50,13 @@ def oh1 title
end
def opoo warning
puts "#{Tty.red}Warning#{Tty.reset}: #{warning}"
STDERR.puts "#{Tty.red}Warning#{Tty.reset}: #{warning}"
end
def onoe error
lines = error.to_s.split'\n'
puts "#{Tty.red}Error#{Tty.reset}: #{lines.shift}"
puts lines unless lines.empty?
lines = error.to_s.split("\n")
STDERR.puts "#{Tty.red}Error#{Tty.reset}: #{lines.shift}"
STDERR.puts lines unless lines.empty?
end
def ofail error