fix(dev): make hooks and bash seams safer

This commit is contained in:
Tianyi Cui
2026-06-17 21:26:44 +08:00
parent b920239389
commit 513e16f9dc
8 changed files with 41 additions and 8 deletions

View File

@@ -17,12 +17,12 @@ Install dependencies from the repo root:
pnpm install
```
The install also runs the root `postinstall` script, which installs lefthook from the repo dev dependency.
The install also runs the root `postinstall` script, which installs lefthook from the repo dev dependency through `scripts/install-lefthook.mjs`; the wrapper uses lefthook's reviewed `--force` mode so linked worktrees with an existing `core.hooksPath` do not fail normal `pnpm run …` commands.
If hooks are missing because dependencies were restored from cache or `postinstall` was skipped, install them manually:
```sh
pnpm exec lefthook install
pnpm exec lefthook install --force
```
Run typecheck once after a fresh clone: