next.js
a520dc92 - fix: worker logs should still support color (#84024)

Commit
122 days ago
fix: worker logs should still support color (#84024) Logs emitted from the static export worker lost their ANSI colors because the worker process starts with piped stdio, so picocolors disables coloring. Most terminal-color helpers treat ANSI styling as a TTY-only feature. At module load it checks process.stdout.isTTY; when a process’ stdout is piped to another stream (as is the case in our export worker), Node marks it as non‑TTY. To fix, when spawning the worker, this PR will re-check color support using the parent’s TTY/env state and set `FORCE_COLOR=1` only when the parent would have colored output (respecting user opt-outs).
Author
Parents
Loading