diff --git a/.changeset/real-knives-bathe.md b/.changeset/real-knives-bathe.md new file mode 100644 index 00000000000..9f9642f418b --- /dev/null +++ b/.changeset/real-knives-bathe.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-installation": patch +--- + +Fetches the local module real path diff --git a/pkg-manager/plugin-commands-installation/src/recursive.ts b/pkg-manager/plugin-commands-installation/src/recursive.ts index bf77d8eb18f..6f5790627ab 100755 --- a/pkg-manager/plugin-commands-installation/src/recursive.ts +++ b/pkg-manager/plugin-commands-installation/src/recursive.ts @@ -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) {