diff options
Diffstat (limited to 'spec/bundler/support/helpers.rb')
-rw-r--r-- | spec/bundler/support/helpers.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb index 7d1bd65185..e9c9e766cf 100644 --- a/spec/bundler/support/helpers.rb +++ b/spec/bundler/support/helpers.rb @@ -210,8 +210,10 @@ module Spec yield stdin, stdout, wait_thr if block_given? stdin.close - command_execution.stdout = Thread.new { stdout.read }.value.strip - command_execution.stderr = Thread.new { stderr.read }.value.strip + stdout_read_thread = Thread.new { stdout.read } + stderr_read_thread = Thread.new { stderr.read } + command_execution.stdout = stdout_read_thread.value.strip + command_execution.stderr = stderr_read_thread.value.strip command_execution.exitstatus = wait_thr && wait_thr.value.exitstatus end |