mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-28 02:53:15 -04:00
fix: partial install in workspace with patches should not fail (#4956)
close #4954
This commit is contained in:
6
.changeset/cold-toes-push.md
Normal file
6
.changeset/cold-toes-push.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm install` in a workspace with patches should not fail when doing partial installation [#4954](https://github.com/pnpm/pnpm/issues/4954).
|
||||
@@ -103,7 +103,11 @@ export default async function (
|
||||
} = await resolveDependencyTree(projectsToResolve, opts)
|
||||
|
||||
// We only check whether patches were applied in cases when the whole lockfile was reanalyzed.
|
||||
if (opts.patchedDependencies && (opts.forceFullResolution || !opts.wantedLockfile.packages?.length)) {
|
||||
if (
|
||||
opts.patchedDependencies &&
|
||||
(opts.forceFullResolution || !opts.wantedLockfile.packages?.length) &&
|
||||
Object.keys(opts.wantedLockfile.importers).length === importers.length
|
||||
) {
|
||||
verifyPatches(Object.keys(opts.patchedDependencies), appliedPatches)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user