Skip to content

Commit

Permalink
fix: set $stdout.sync = true
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jul 13, 2018
1 parent f9fabc5 commit f37c8f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pact/mock_service/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ def open_log_file
end

def webbrick_opts
# By default, the webrick logs go to $stderr, which then show up as an ERROR
# log in pact-go, so it was changed to $stdout.
# $stdout needs sync = true for pact-js to determine the port dynamically from
# the output (otherwise it does not flush in time for the port to be read)
$stdout.sync = true
opts = {
:Port => port,
:Host => host,
Expand Down

0 comments on commit f37c8f8

Please sign in to comment.