Skip to content

Commit f37c8f8

Browse files
committed
fix: set $stdout.sync = true
1 parent f9fabc5 commit f37c8f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/pact/mock_service/run.rb

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def open_log_file
7373
end
7474

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

0 commit comments

Comments
 (0)