fix: don't always index the project directory (#3964)

close #3949
This commit is contained in:
Zoltan Kochan authored and GitHub committed 2021-11-08 17:11:00 +02:00
1 parent dac5390ac0
commit 5b90ab98f0
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
"@pnpm/lifecycle": patch
"pnpm": patch
---
Do not index the project directory if it should not be hard linked to any other project [#3949](https://github.com/pnpm/pnpm/issues/3949).
@@ -50,7 +50,7 @@ export default async function runLifecycleHooksConcurrently (
if ((manifest.scripts == null) || !manifest.scripts[stage]) continue
await runLifecycleHook(stage, manifest, runLifecycleHookOpts)
}
if (targetDirs == null) return
if (targetDirs == null || targetDirs.length === 0) return
const filesResponse = await fetchFromDir(rootDir, {})
await Promise.all(
targetDirs.map((targetDir) => opts.storeController.importPackage(targetDir, {