Skip to content

Commit dc66c66

Browse files
committed
Update package.json prepare script so it only runs Husky when a .git directory is present
1 parent 9b649dc commit dc66c66

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"test:e2e:full": "dotenv -e .env.development -- cross-env FORCE_COLOR=1 E2E_MOCKS=1 npx playwright test",
6161
"test:unit": "FORCE_COLOR=1 npx vitest run",
6262
"upgrade": "npx @astrojs/upgrade",
63-
"prepare": "husky"
63+
"prepare": "node -e \"const fs=require('node:fs');if(!fs.existsSync('.git')){console.log('Skipping Husky install (missing .git directory)');process.exit(0);}\" && husky"
6464
},
6565
"dependencies": {
6666
"@astrojs/check": "0.9.6",

0 commit comments

Comments
 (0)