aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-09-23 21:23:17 +0800
committerXu Cheng2015-09-23 21:46:45 +0800
commit322a93bce0a7d592ba5f5be87731a7f9db22fafd (patch)
treeaf7a23daa4001fb529e74beb90b9783ec1b73669 /Library
parent8c9f0120cae52d60704e83f61b278b009b897422 (diff)
downloadbrew-322a93bce0a7d592ba5f5be87731a7f9db22fafd.tar.bz2
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>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/test-bot.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb
index 3f3e9ae52..d7886ff3c 100644
--- a/Library/Homebrew/cmd/test-bot.rb
+++ b/Library/Homebrew/cmd/test-bot.rb
@@ -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