0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-18 00:54:51 +01:00

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
parent 564b9f0aff
commit a49aecf623
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

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