Skip to content

Commit 54c157d

Browse files
authored
cherry-pick(#30677): chore: print resolved host in the http server te… (#30679)
…rminal
1 parent 2d437e8 commit 54c157d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/playwright-core/src/utils/httpServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ export class HttpServer {
126126
this._urlPrefix = address;
127127
} else {
128128
this._port = address.port;
129-
this._urlPrefix = `http://${host}:${address.port}`;
129+
const resolvedHost = address.family === 'IPv4' ? address.address : `[${address.address}]`;
130+
this._urlPrefix = `http://${resolvedHost}:${address.port}`;
130131
}
131132
}
132133
return this._urlPrefix;

0 commit comments

Comments
 (0)