Skip to content

Commit

Permalink
fix: linking bins of local deps, when node-linker is hoisted
Browse files Browse the repository at this point in the history
close #6486
  • Loading branch information
zkochan committed Apr 29, 2023
1 parent e6b83c8 commit 6319a25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/hot-buttons-train.md
@@ -0,0 +1,6 @@
---
"@pnpm/headless": patch
"pnpm": patch
---

Link the bin files of local workspace dependencies, when `node-linker` is set to `hoisted` [6486](https://github.com/pnpm/pnpm/issues/6486).
2 changes: 1 addition & 1 deletion pkg-manager/headless/src/index.ts
Expand Up @@ -516,7 +516,7 @@ export async function headlessInstall (opts: HeadlessOptions) {
/** Skip linking and due to no project manifest */
if (!opts.ignorePackageManifest) {
await Promise.all(selectedProjects.map(async (project) => {
if (opts.publicHoistPattern?.length && path.relative(opts.lockfileDir, project.rootDir) === '') {
if (opts.nodeLinker === 'hoisted' || opts.publicHoistPattern?.length && path.relative(opts.lockfileDir, project.rootDir) === '') {
await linkBinsOfImporter(project, {
extraNodePaths: opts.extraNodePaths,
preferSymlinkedExecutables: opts.preferSymlinkedExecutables,
Expand Down

0 comments on commit 6319a25

Please sign in to comment.