test-bot: use IO#read instead of IO#gets

IO#gets will only return for every new lines, which will be bad for
`brew install` since we print dots in single line.

Closes Homebrew/homebrew#44264.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-09-23 21:23:17 +08:00
parent 8c9f0120ca
commit 322a93bce0

View File

@ -154,9 +154,12 @@ module Homebrew
working_dir.cd { exec(*@command) }
end
write.close
while line = read.gets
puts line if verbose
@output += line
while buf = read.read(1)
if verbose
print buf
$stdout.flush
end
@output << buf
end
ensure
read.close