Skip to content

Commit

Permalink
Merge pull request #75 from HLTech/run-husky-on-non-ci-only
Browse files Browse the repository at this point in the history
fix: Run husky on non-CI env only
  • Loading branch information
LukaszNowakPL authored Jul 8, 2024
2 parents 51d1a6d + 6c9eee3 commit 1c2108c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in CI
if (process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
husky();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build": "tsc -p tsconfig.json",
"release": "semantic-release",
"test": "jest",
"prepare": "husky"
"prepare": "node .husky/install.mjs"
},
"dependencies": {
"glob": "^7.1.6",
Expand Down

0 comments on commit 1c2108c

Please sign in to comment.