Skip to content

Commit

Permalink
fix: use real path for module root dir (pnpm#6524)
Browse files Browse the repository at this point in the history
  • Loading branch information
grimly committed Jan 4, 2024
1 parent c0182b4 commit 227c903
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-knives-bathe.md
@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-installation": patch
---

Fetches the local module real path
1 change: 1 addition & 0 deletions pkg-manager/plugin-commands-installation/src/recursive.ts
Expand Up @@ -170,6 +170,7 @@ export async function recursive (
const calculatedRepositoryRoot = await fs.realpath(calculateRepositoryRoot(opts.workspaceDir, importers.map(x => x.rootDir)))
const isFromWorkspace = isSubdir.bind(null, calculatedRepositoryRoot)
importers = await pFilter(importers, async ({ rootDir }: { rootDir: string }) => isFromWorkspace(await fs.realpath(rootDir)))
importers = await Promise.all(importers.map(async ({ rootDir, ...rest }) => ({ rootDir: await fs.realpath(rootDir), ...rest })))
if (importers.length === 0) return true
let mutation!: string
switch (cmdFullName) {
Expand Down

0 comments on commit 227c903

Please sign in to comment.