Don't ignore blank lines in the output

This fixes the stdout code to ensure that empty lines are outputted.
Many times, these blank lines are intentional, so foreman should not
suppress them.

This fixes #286
This commit is contained in:
Matt Venables committed 2012-12-21 11:12:52 -05:00
1 parent 553ac7f81f
commit 61eca5a1d8
1 file changed
+1 -1
+1 -1
View File
@@ -54,7 +54,7 @@ class Foreman::Engine::CLI < Foreman::Engine
end end
def output(name, data) def output(name, data)
data.to_s.chomp.split("\n").each do |message| data.to_s.lines.map(&:chomp).each do |message|
output = "" output = ""
output += $stdout.color(@colors[name.split(".").first].to_sym) output += $stdout.color(@colors[name.split(".").first].to_sym)
output += "#{Time.now.strftime("%H:%M:%S")} #{pad_process_name(name)} | " output += "#{Time.now.strftime("%H:%M:%S")} #{pad_process_name(name)} | "