Don't forcibly output newlines for provisioners
This commit is contained in:
parent
cf0ba53fbb
commit
8379d0e20e
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue