lib/container_ship/command/modules/docker.rb in container_ship-0.1.5 vs lib/container_ship/command/modules/docker.rb in container_ship-0.1.6

- old
+ new

@@ -13,13 +13,14 @@ def sh(command) puts command status = nil - Open3.popen3(command) do |_i, o, e, w| - o.each { |line| puts line } - e.each { |line| puts line } - status = w.value + Open3.popen3(command) do |_stdin, stdout, stderr, wait_thr| + Thread.new(stdout) { |io| io.each { puts _1 } } + Thread.new(stderr) { |io| io.each { puts _1 } } + + status = wait_thr.value end exit(status.exitstatus) unless status.success? end end end