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.
This commit is contained in:
1 parent
d8be9706d9
commit
978062f143
1 file changed
+1
-1
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user