Skip to content

Commit

Permalink
Only print errors if command fails
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Jan 24, 2020
1 parent c08feba commit 4e359bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/support/remote_debugging_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ def remote_debug(*commands)
enter(*commands)

Open3.popen3(shell_out_env, "ruby #{example_path}") do |_i, _o, e, wait_thr|
err_thr = Thread.new { print e.read }
err_thr = Thread.new { e.read }

yield

err_thr.join
exit_status = wait_thr.value

wait_thr.value
print err_thr.value unless exit_status.success?

exit_status
end
end

Expand Down

0 comments on commit 4e359bd

Please sign in to comment.