From 61eca5a1d8ed01aa0fc7e9e5ede6ee777ac24f30 Mon Sep 17 00:00:00 2001 From: Matt Venables Date: Fri, 21 Dec 2012 11:12:52 -0500 Subject: [PATCH] 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 --- lib/foreman/engine/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman/engine/cli.rb b/lib/foreman/engine/cli.rb index 4fbc058..60c0542 100644 --- a/lib/foreman/engine/cli.rb +++ b/lib/foreman/engine/cli.rb @@ -54,7 +54,7 @@ class Foreman::Engine::CLI < Foreman::Engine end def output(name, data) - data.to_s.chomp.split("\n").each do |message| + data.to_s.lines.map(&:chomp).each do |message| output = "" output += $stdout.color(@colors[name.split(".").first].to_sym) output += "#{Time.now.strftime("%H:%M:%S")} #{pad_process_name(name)} | "