From 9ac16b4aa1bbc14796897dbeb9546960ae63eb50 Mon Sep 17 00:00:00 2001 From: Poetry Of Code <101225909+poetryofcode@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:30:56 +0000 Subject: [PATCH] fix: install git hooks in linked worktrees (#4387) (#4722) The prepare guard used `test -d .git`, which is false in a linked worktree where .git is a file, so lefthook install was silently skipped. Use `test -e .git` so clones and linked worktrees both install hooks while non-git directories remain a no-op. Co-authored-by: Claude Opus 5.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c332c9fc03..ac71b732a9 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "package:codex-plugin": "node scripts/package-codex-plugin.mjs", "upload:docs-images": "bash scripts/upload-docs-images.sh", "host:registry-assets": "bun run scripts/host-registry-assets.ts", - "prepare": "test -d .git && lefthook install || true", + "prepare": "test -e .git && lefthook install || true", "lint:registry-items": "node scripts/lint-registry-items.mjs" }, "dependencies": {