Skip to content

Commit 99ce5e0

Browse files
committed
fix(install): [git] make postinstall script work with git install
- checks for husky executable before attempting to install husky Signed-off-by: Lexus Drumgold <[email protected]>
1 parent 0948ea5 commit 99ce5e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"fix:dedupe": "yarn dedupe --strategy=highest",
4747
"fix:format": "prettier --cache --write .",
4848
"fix:lint": "yarn check:lint --cache --fix",
49-
"postinstall": "chmod +x .husky/* && husky install",
49+
"postinstall": "[ -f ./node_modules/.bin/husky ] && chmod +x .husky/* && husky install || exit 0",
5050
"postpack": "toggle-scripts +postinstall",
5151
"postpublish": "toggle-scripts +prepack",
5252
"prepack": "toggle-scripts -postinstall && yarn build",

0 commit comments

Comments
 (0)