From 978062f1439b8b2adaaf8d192a0fe2463a697e1d Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sun, 29 Mar 2026 01:12:09 +0100 Subject: [PATCH] fix: use process.stderr.write instead of console.error for script logging (#11140) Prevents Jest from intercepting the lifecycle hook script output and displaying it with stack traces, which made normal output look like errors. --- exec/lifecycle/src/runLifecycleHook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec/lifecycle/src/runLifecycleHook.ts b/exec/lifecycle/src/runLifecycleHook.ts index e73f8f096a..39c6f9a969 100644 --- a/exec/lifecycle/src/runLifecycleHook.ts +++ b/exec/lifecycle/src/runLifecycleHook.ts @@ -107,7 +107,7 @@ Please unset the scriptShell option, or configure it to a .exe instead. wd: opts.pkgRoot, }) } else if (!opts.silent) { - console.error(chalk.dim(`$ ${m.scripts[stage]}`)) + process.stderr.write(chalk.dim(`$ ${m.scripts[stage]}`) + '\n') } const logLevel = (opts.stdio !== 'inherit' || opts.silent) ? 'silent'