fix(ci): skip lefthook install when .git directory missing

- Prevents lefthook from failing in CI/Vercel environments
- Only installs git hooks when in actual git repository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-11-29 13:51:05 +10:00
parent 23dd6b1a33
commit 0d7a8e4696
6 changed files with 1336 additions and 6 deletions

View file

@ -24,7 +24,7 @@
"changeset": "changeset",
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile",
"changeset:publish": "pnpm build && changeset publish",
"prepare": "lefthook install"
"prepare": "node -e \"if (require('fs').existsSync('.git')) { require('child_process').execSync('lefthook install', {stdio: 'inherit'}) }\""
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",