Commit 3df46a10 authored by Peter Leitzen's avatar Peter Leitzen Committed by Ramya Authappan

QA: Make shellout more responsive

Avoid line-buffering and flush each character during shellout.

This useful for commands (e.g. gcloud) which display its progress by
printing single dots.
parent a6701647
......@@ -19,7 +19,7 @@ module QA
Open3.popen2e(*command) do |stdin, out, wait|
stdin.puts(stdin_data) if stdin_data
stdin.close if stdin_data
out.each { |line| puts line }
out.each_char { |char| print char }
if wait.value.exited? && wait.value.exitstatus.nonzero?
raise CommandError, "Command `#{command}` failed!"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment