fix install

npm error command sh -c husky
Error: npm install --omit=dev failed with code 127
This commit is contained in:
Yejun Su 2026-04-30 23:10:37 +08:00
parent fc5d448a29
commit a489ff84bd
No known key found for this signature in database
GPG Key ID: AD03A563F321CA44
2 changed files with 7 additions and 1 deletions

6
.husky/install.mjs Normal file
View File

@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
process.exit(0);
}
const husky = (await import("husky")).default;
console.log(husky());

View File

@ -17,7 +17,7 @@
"scripts": {
"lint": "biome check --write .",
"lint:check": "biome check .",
"prepare": "husky"
"prepare": "node .husky/install.mjs"
},
"devDependencies": {
"@biomejs/biome": "^2.4.12",