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:
silverwind
2026-02-20 04:34:41 +01:00
co-authored by Claude Opus 4.6
parent 564b9f0aff
commit a49aecf623
+1 -1
View File
@@ -5,7 +5,7 @@ set -euo pipefail
WORK_DIR=$(mktemp -d)
# 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() {
if [ -n "${SERVER_PID:-}" ]; then