diff --git a/lib/pact/mock_service/run.rb b/lib/pact/mock_service/run.rb index 15c635d..16fbfed 100644 --- a/lib/pact/mock_service/run.rb +++ b/lib/pact/mock_service/run.rb @@ -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,