GH-4201: Split process output by line so prefix shows on each line. Also fixed localization reference.
This commit is contained in:
parent
5de3f30bb0
commit
cf784d5d3c
|
@ -31,6 +31,10 @@ module VagrantPlugins
|
||||||
Regexp.new(regexp)
|
Regexp.new(regexp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Output rsync process stdout/stderr line by line
|
||||||
|
def self.outputRsyncData(io_name, data)
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_single(machine, ssh_info, opts)
|
def self.rsync_single(machine, ssh_info, opts)
|
||||||
# Folder info
|
# Folder info
|
||||||
guestpath = opts[:guestpath]
|
guestpath = opts[:guestpath]
|
||||||
|
@ -122,7 +126,7 @@ module VagrantPlugins
|
||||||
"vagrant.rsync_folder_excludes", excludes: excludes.inspect))
|
"vagrant.rsync_folder_excludes", excludes: excludes.inspect))
|
||||||
end
|
end
|
||||||
if opts.include?(:showoutput)
|
if opts.include?(:showoutput)
|
||||||
machine.ui.info(I18n.t("vagrant.rsync_showingoutput"));
|
machine.ui.info(I18n.t("vagrant.rsync_showing_output"));
|
||||||
end
|
end
|
||||||
|
|
||||||
# If we have tasks to do before rsyncing, do those.
|
# If we have tasks to do before rsyncing, do those.
|
||||||
|
@ -132,8 +136,9 @@ module VagrantPlugins
|
||||||
|
|
||||||
if opts.include?(:showoutput)
|
if opts.include?(:showoutput)
|
||||||
command_opts[:notify] = [ :stdout, :stderr ];
|
command_opts[:notify] = [ :stdout, :stderr ];
|
||||||
r = Vagrant::Util::Subprocess.execute(
|
r = Vagrant::Util::Subprocess.execute(*(command + [command_opts])) {
|
||||||
*(command + [command_opts])) { |io_name,data| machine.ui.info("rsync[#{io_name}] -> #{data}") }
|
|io_name,data| data.each_line { |line| machine.ui.info("rsync[#{io_name}] -> #{line}") }
|
||||||
|
}
|
||||||
else
|
else
|
||||||
r = Vagrant::Util::Subprocess.execute(*(command + [command_opts]))
|
r = Vagrant::Util::Subprocess.execute(*(command + [command_opts]))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue