Fix FORCE_COLOR corrupting port number in e2e script

FORCE_COLOR=1 on CI caused console.log to wrap the port number in
ANSI color codes, breaking ROOT_URL parsing. Use process.stdout.write
which bypasses color formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
silverwindandClaude Opus 4.6 committed 2026-02-20 04:34:41 +01:00
1 parent 564b9f0aff
commit a49aecf623
1 file changed
+1 -1
+1 -1
View File
@@ -5,7 +5,7 @@ set -euo pipefail
WORK_DIR=$(mktemp -d) WORK_DIR=$(mktemp -d)
# Find a random free port # Find a random free port
FREE_PORT=$(node -e "const s=require('net').createServer();s.listen(0,'127.0.0.1',()=>{console.log(s.address().port);s.close()})") FREE_PORT=$(node -e "const s=require('net').createServer();s.listen(0,'127.0.0.1',()=>{process.stdout.write(String(s.address().port));s.close()})")
cleanup() { cleanup() {
if [ -n "${SERVER_PID:-}" ]; then if [ -n "${SERVER_PID:-}" ]; then