From ba202df70bee93e8314a44dbaad5edaa1a32700b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 31 Mar 2013 15:18:47 -0500 Subject: [PATCH] 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. --- Library/Homebrew/utils.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 2879e6a11c..81068e9efd 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -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