From d80fd8dafbcf8b011f4ac631c11be81af0f4e5a7 Mon Sep 17 00:00:00 2001 From: Daniel Boca Date: Sat, 4 Mar 2023 23:42:05 +0200 Subject: [PATCH] F #5906: added printing of stdout & stderr for onehost sync --force --- src/mad/ruby/CommandManager.rb | 4 ++++ src/mad/ruby/HostSyncManager.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mad/ruby/CommandManager.rb b/src/mad/ruby/CommandManager.rb index 270e35ad29..3d5f0b81b8 100644 --- a/src/mad/ruby/CommandManager.rb +++ b/src/mad/ruby/CommandManager.rb @@ -144,6 +144,10 @@ private terminator_e = nil mutex = Mutex.new + # print stdout and stderr for troubleshooting + STDERR.puts o.read + STDERR.puts e.read + out_reader = Thread.new { o.read } err_reader = Thread.new { e.read } terminator = Thread.new { diff --git a/src/mad/ruby/HostSyncManager.rb b/src/mad/ruby/HostSyncManager.rb index 64e4319597..4716acf899 100644 --- a/src/mad/ruby/HostSyncManager.rb +++ b/src/mad/ruby/HostSyncManager.rb @@ -64,7 +64,7 @@ class HostSyncManager end assemble_cmd = lambda do |steps| - "exec 2>/dev/null; #{steps.join(' && ')}" + "exec 2>&1 /dev/null; #{steps.join(' && ')}" end case copy_method