fix: incorrect error block when subproject has been patched (#6183) (#6184)

close #6183
This commit is contained in:
SoonIter
2023-03-06 07:28:00 +08:00
committed by GitHub
parent 807158e58c
commit 9d906fc94a
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/resolve-dependencies": patch
"pnpm": patch
---
Fix the incorrect error block when subproject has been patched [#6183](https://github.com/pnpm/pnpm/issues/6183)

View File

@@ -120,7 +120,7 @@ export async function resolveDependencies (
// We only check whether patches were applied in cases when the whole lockfile was reanalyzed.
if (
opts.patchedDependencies &&
(opts.forceFullResolution || !opts.wantedLockfile.packages?.length) &&
(opts.forceFullResolution || !Object.keys(opts.wantedLockfile.packages ?? {})?.length) &&
Object.keys(opts.wantedLockfile.importers).length === importers.length
) {
verifyPatches({