diff --git a/CHANGELOG.md b/CHANGELOG.md index fcce264f0..2fcbe0663 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ BUG FIXES: in the Vagrantfile, helping differentiate multi-VM. [GH-1281] - NFS works properly on CentOS hosts. [GH-1394] - Solaris guests actually shut down properly. [GH-1506] + - All provisioners only output newlines when the provisioner sends a + newline. This results in the output looking a lot nicer. ## 1.2.4 (July 16, 2013) diff --git a/plugins/provisioners/ansible/provisioner.rb b/plugins/provisioners/ansible/provisioner.rb index 8891f0357..aeafd86a9 100644 --- a/plugins/provisioners/ansible/provisioner.rb +++ b/plugins/provisioners/ansible/provisioner.rb @@ -33,7 +33,7 @@ module VagrantPlugins begin Vagrant::Util::Subprocess.execute(*command) do |type, data| if type == :stdout || type == :stderr - @machine.env.ui.info(data.chomp, :prefix => false) + @machine.env.ui.info(data, :new_line => false, :prefix => false) end end rescue Vagrant::Util::Subprocess::LaunchError diff --git a/plugins/provisioners/cfengine/provisioner.rb b/plugins/provisioners/cfengine/provisioner.rb index f9a60676a..8e55a2c76 100644 --- a/plugins/provisioners/cfengine/provisioner.rb +++ b/plugins/provisioners/cfengine/provisioner.rb @@ -41,10 +41,9 @@ module VagrantPlugins if [:stderr, :stdout].include?(type) # Output the data with the proper color based on the stream. color = type == :stdout ? :green : :red - - # Note: Be sure to chomp the data to avoid the newlines that the - # Chef outputs. - @machine.ui.info(data.chomp, :color => color, :prefix => false) + @machine.ui.info( + data, + :color => color, :new_line => false, :prefix => false) end end end diff --git a/plugins/provisioners/chef/provisioner/chef_client.rb b/plugins/provisioners/chef/provisioner/chef_client.rb index c4a5e886d..40b0618c2 100644 --- a/plugins/provisioners/chef/provisioner/chef_client.rb +++ b/plugins/provisioners/chef/provisioner/chef_client.rb @@ -74,10 +74,8 @@ module VagrantPlugins exit_status = @machine.communicate.sudo(command, :error_check => false) do |type, data| # Output the data with the proper color based on the stream. color = type == :stdout ? :green : :red - - # Note: Be sure to chomp the data to avoid the newlines that the - # Chef outputs. - @machine.env.ui.info(data.chomp, :color => color, :prefix => false) + @machine.env.ui.info( + data, :color => color, :new_line => false, :prefix => false) end # There is no need to run Chef again if it converges diff --git a/plugins/provisioners/chef/provisioner/chef_solo.rb b/plugins/provisioners/chef/provisioner/chef_solo.rb index 82b73a7c3..a9cf326a8 100644 --- a/plugins/provisioners/chef/provisioner/chef_solo.rb +++ b/plugins/provisioners/chef/provisioner/chef_solo.rb @@ -155,10 +155,8 @@ module VagrantPlugins exit_status = @machine.communicate.sudo(command, :error_check => false) do |type, data| # Output the data with the proper color based on the stream. color = type == :stdout ? :green : :red - - # Note: Be sure to chomp the data to avoid the newlines that the - # Chef outputs. - @machine.env.ui.info(data.chomp, :color => color, :prefix => false) + @machine.env.ui.info( + data, :color => color, :new_line => false, :prefix => false) end # There is no need to run Chef again if it converges diff --git a/plugins/provisioners/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb index 522a75245..483e67761 100644 --- a/plugins/provisioners/puppet/provisioner/puppet.rb +++ b/plugins/provisioners/puppet/provisioner/puppet.rb @@ -125,8 +125,9 @@ module VagrantPlugins :manifest => config.manifest_file) @machine.communicate.sudo(command) do |type, data| - data.chomp! - @machine.env.ui.info(data, :prefix => false) if !data.empty? + if !data.empty? + @machine.env.ui.info(data, :new_line => false :prefix => false) + end end end diff --git a/plugins/provisioners/puppet/provisioner/puppet_server.rb b/plugins/provisioners/puppet/provisioner/puppet_server.rb index c7d2fdf10..14ff66098 100644 --- a/plugins/provisioners/puppet/provisioner/puppet_server.rb +++ b/plugins/provisioners/puppet/provisioner/puppet_server.rb @@ -63,8 +63,9 @@ module VagrantPlugins @machine.env.ui.info I18n.t("vagrant.provisioners.puppet_server.running_puppetd") @machine.communicate.sudo(command) do |type, data| - data.chomp! - @machine.env.ui.info(data, :prefix => false) if !data.empty? + if !data.empty? + @machine.env.ui.info(data, :new_line => false, :prefix => false) + end end end end diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb index f62fa1a69..5af8df28b 100644 --- a/plugins/provisioners/shell/provisioner.rb +++ b/plugins/provisioners/shell/provisioner.rb @@ -35,7 +35,9 @@ module VagrantPlugins # Note: Be sure to chomp the data to avoid the newlines that the # Chef outputs. - @machine.env.ui.info(data.chomp, :color => color, :prefix => false) + @machine.env.ui.info( + data, + :color => color, :new_line => false, :prefix => false) end end end