From b4abbe432e2f1cacb0e0aa7b18080b54b037693d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Sat, 11 Jul 2026 15:27:34 +0900 Subject: [PATCH] fix: ensure color output for child processes in Windows environment (#17695) --- scripts/dev.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/dev.mjs b/scripts/dev.mjs index 3b7597182b..5253f0336f 100644 --- a/scripts/dev.mjs +++ b/scripts/dev.mjs @@ -31,6 +31,9 @@ let shutdownPromise = null; */ function spawnChildProcess(command, args, options) { const isWindows = process.platform === 'win32'; + const shouldForceColor = (process.stdout.isTTY || process.stderr.isTTY) + && process.env.FORCE_COLOR == null + && process.env.NO_COLOR == null; const pnpmPath = _dirname + '/../node_modules/pnpm/bin/pnpm.mjs'; const windowsCommand = [process.execPath, pnpmPath, ...args] .map(argument => `"${argument}"`) @@ -45,6 +48,7 @@ function spawnChildProcess(command, args, options) { // Ctrl+C, allowing only this supervisor to coordinate the shutdown. windowsVerbatimArguments: true, windowsHide: false, + env: shouldForceColor ? { FORCE_COLOR: '1' } : undefined, stdout: 'pipe', stderr: 'pipe', buffer: false,