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:
parent
8c9f0120ca
commit
322a93bce0
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user