fix(core): don't fail on skipped optional deps, when calculating depsRequiringBuild (#8404)
This commit is contained in:
1 parent
9b4f73caaf
commit
39f693ba89
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
---
|
||||
|
||||
Don't fail on skipped optional dependencies, when searching for dependencies that should be built.
|
||||
@@ -1420,7 +1420,7 @@ const _installInContext: InstallFunction = async (projects, ctx, opts) => {
|
||||
const depsRequiringBuild: DepPath[] = []
|
||||
if (opts.returnListOfDepsRequiringBuild) {
|
||||
await Promise.all(Object.entries(dependenciesGraph).map(async ([depPath, node]) => {
|
||||
if (node == null) return // We cannot detect if a skipped optional dependency requires build
|
||||
if (node?.fetching == null) return // We cannot detect if a skipped optional dependency requires build
|
||||
const { files } = await node.fetching()
|
||||
if (files.requiresBuild) {
|
||||
depsRequiringBuild.push(depPath as DepPath)
|
||||
|
||||
Reference in new issue
Block a user