From 5c33fdfb5b9ab49551fad04a235a529e4114f34b Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 1 Oct 2009 15:41:15 +0100 Subject: [PATCH] If an exception has newlines, render them well --- Library/Homebrew/utils.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 208a01e8ee..976adaa3a4 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -34,7 +34,9 @@ def opoo warning end def onoe error - puts "\033[1;31m==>\033[0;0;1m Error\033[0;0m: #{error}" + lines = error.to_s.split'\n' + puts "\033[1;31m==>\033[0;0;1m Error\033[0;0m: #{lines.shift}" + puts *lines unless lines.empty? end def pretty_duration s