diff options
author | Colby Swandale <me@colby.fyi> | 2019-04-09 19:24:01 +1000 |
---|---|---|
committer | Colby Swandale <me@colby.fyi> | 2019-04-09 19:24:01 +1000 |
commit | ddaebc287b5250d94ba1fcf36ca875ee8ba02ac8 (patch) | |
tree | e823261b6e02d00827d753cb5c383ee0bddff840 | |
parent | 7e8ab705f91d67e45465b26b2d3598a94317e7bd (diff) | |
download | bundler-colby/allow-otp.tar.gz |
fix breaking gem helper specscolby/allow-otp
-rw-r--r-- | lib/bundler/gem_helper.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 69bff769d7..718a6a41d4 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -192,13 +192,15 @@ module Bundler def sh_with_status(cmd, &block) Bundler.ui.debug(cmd) SharedHelpers.chdir(base) do - outbuf = IO.popen(cmd, :err => [:child, :out]) do |io| - Thread.new { print io.getc until io.eof? }.join + outbuf = StringIO.new + IO.popen(cmd, :err => [:child, :out]) do |io| + print outbuf.putc(io.getc) until io.eof? io.close end status = $? - block.call(outbuf) if status.success? && block - [outbuf, status] + output = outbuf.string + block.call(output) if status.success? && block + [output, status] end end |