summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2019-07-01 14:43:38 +0000
committerRamya Authappan <rauthappan@gitlab.com>2019-07-01 14:43:38 +0000
commit3df46a1054c7ec37f8ef651a078ded741c991ddd (patch)
tree40f431e4efa14331554516f56531c1f837b12c6a
parenta6701647fffa07f41f4ff1cb0a367deb3204bf51 (diff)
downloadgitlab-ce-3df46a1054c7ec37f8ef651a078ded741c991ddd.tar.gz
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.
-rw-r--r--qa/qa/service/shellout.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/qa/qa/service/shellout.rb b/qa/qa/service/shellout.rb
index 7065ab0e7f3..217df669db3 100644
--- a/qa/qa/service/shellout.rb
+++ b/qa/qa/service/shellout.rb
@@ -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!"