fix: print warnings to stderr (#8342)
This commit is contained in:
1 parent
d20eed33ab
commit
98c8bd69cb
3 files changed
+11
-23
No files matched your search
@@ -28,9 +28,8 @@ export async function getConfig (
|
||||
delete config.reporter // This is a silly workaround because @pnpm/core expects a function as opts.reporter
|
||||
}
|
||||
|
||||
// The warning should not be printed when --json is specified
|
||||
if (warnings.length > 0 && !cliOptions.json) {
|
||||
console.log(warnings.map((warning) => formatWarn(warning)).join('\n'))
|
||||
if (warnings.length > 0) {
|
||||
console.warn(warnings.map((warning) => formatWarn(warning)).join('\n'))
|
||||
}
|
||||
|
||||
return config
|
||||
|
||||
Reference in new issue
Block a user