mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix(core): don't try to read the name prop of manifest that is null
This commit is contained in:
5
.changeset/hungry-pens-know.md
Normal file
5
.changeset/hungry-pens-know.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
---
|
||||
|
||||
Fixed an exception that was caused by reading the name property from a manifest that was not defined.
|
||||
@@ -873,10 +873,14 @@ const _installInContext: InstallFunction = async (projects, ctx, opts) => {
|
||||
await Promise.all(
|
||||
directPkgs.map(async (dep) => {
|
||||
const manifest = await dep.fetchingBundledManifest?.() ?? await safeReadProjectManifestOnly(dep.dir)
|
||||
let nodeExecPath: string | undefined
|
||||
if (manifest?.name) {
|
||||
nodeExecPath = project.manifest.dependenciesMeta?.[manifest.name]?.node
|
||||
}
|
||||
return {
|
||||
location: dep.dir,
|
||||
manifest,
|
||||
nodeExecPath: project.manifest.dependenciesMeta?.[manifest!.name!]?.node,
|
||||
nodeExecPath,
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user