fix: do not output ignored scripts warnings and error messages at the same time (#9078)

Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
btea
2025-02-12 05:29:07 +08:00
committed by GitHub
parent 483384af68
commit b60661af3b
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/default-reporter": patch
---
When `strict-dep-builds` is set to `true`, the same warning and error messages should not be output simultaneously [#9078](https://github.com/pnpm/pnpm/pull/9078).

View File

@@ -86,7 +86,7 @@ export function reportSummary (
msg += EOL
}
}
if (ignoredScripts.packageNames && ignoredScripts.packageNames.length > 0) {
if (ignoredScripts.packageNames && ignoredScripts.packageNames.length > 0 && !opts.pnpmConfig?.strictDepBuilds) {
msg += EOL
msg += boxen(`Ignored build scripts: ${Array.from(ignoredScripts.packageNames).sort().join(', ')}.
Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.`, {