Skip to content

Commit dbff517

Browse files
committed
chore: print resolved host in the http server terminal
1 parent b5dee9e commit dbff517

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)