mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-26 07:27:20 -04:00
fix: extend-node-path=false should work when lockfile is up-to-date
This commit is contained in:
5
.changeset/great-readers-hope.md
Normal file
5
.changeset/great-readers-hope.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/headless": patch
|
||||
---
|
||||
|
||||
`extendNodePath: false` should work.
|
||||
@@ -145,6 +145,7 @@ export default async function link (
|
||||
|
||||
const linkToBin = maybeOpts?.linkToBin ?? path.join(destModules, '.bin')
|
||||
await linkBinsOfPackages(linkedPkgs.map((p) => ({ manifest: p.manifest, location: p.path })), linkToBin, {
|
||||
extendNodePath: opts.extendNodePath,
|
||||
warn: (message: string) => logger.info({ message, prefix: opts.dir }),
|
||||
})
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ interface StrictLinkOptions {
|
||||
reporter: ReporterFunction
|
||||
targetDependenciesField?: DependenciesField
|
||||
dir: string
|
||||
extendNodePath: boolean
|
||||
|
||||
hoistPattern: string[] | undefined
|
||||
forceHoistPattern: boolean
|
||||
@@ -53,6 +54,7 @@ async function defaults (opts: LinkOptions) {
|
||||
return {
|
||||
binsDir: path.join(dir, 'node_modules', '.bin'),
|
||||
dir,
|
||||
extendNodePath: true,
|
||||
force: false,
|
||||
forceSharedLockfile: false,
|
||||
hoistPattern: undefined,
|
||||
|
||||
@@ -446,7 +446,10 @@ export default async (opts: HeadlessOptions) => {
|
||||
)
|
||||
.filter(({ manifest }) => manifest != null) as Array<{ location: string, manifest: DependencyManifest }>,
|
||||
project.binsDir,
|
||||
{ warn: (message: string) => logger.info({ message, prefix: project.rootDir }) }
|
||||
{
|
||||
extendNodePath: opts.extendNodePath,
|
||||
warn: (message: string) => logger.info({ message, prefix: project.rootDir }),
|
||||
}
|
||||
)
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user