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) }
|
working_dir.cd { exec(*@command) }
|
||||||
end
|
end
|
||||||
write.close
|
write.close
|
||||||
while line = read.gets
|
while buf = read.read(1)
|
||||||
puts line if verbose
|
if verbose
|
||||||
@output += line
|
print buf
|
||||||
|
$stdout.flush
|
||||||
|
end
|
||||||
|
@output << buf
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
read.close
|
read.close
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user