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

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

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).

View File

@@ -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, {