You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider strengthening the recommended prepare script in the docs.
Sometimes the suggested "prepare": "husky install" script fails because it assumes the $CWD is a git repo. There are edge cases where it is not... (some builds on docker don't clone the whole git repo). And another edge case is that husky is a devDependency and only the dependency packages are installed...
I like "prepare": "husky install || exit 0" @Titan196 mentioned in #1213 (comment)
Another possible solution: "prepare": "git rev-parse &>/dev/null && husky install || echo 'Not git repo skipping husky install'" which makes it clear we're testing for the $CWD being a git repo... But perhaps not as good a solution if the user installed as husky as devDependency and didn't install the dev dependencies.
Please consider strengthening the recommended
prepare
script in the docs.Sometimes the suggested
"prepare": "husky install"
script fails because it assumes the$CWD
is a git repo. There are edge cases where it is not... (some builds on docker don't clone the whole git repo). And another edge case is that husky is adevDependency
and only thedependency
packages are installed...I like
"prepare": "husky install || exit 0"
@Titan196 mentioned in #1213 (comment)Another possible solution:
"prepare": "git rev-parse &>/dev/null && husky install || echo 'Not git repo skipping husky install'"
which makes it clear we're testing for the$CWD
being a git repo... But perhaps not as good a solution if the user installed as husky asdevDependency
and didn't install the dev dependencies.See #1271
See #1213
The text was updated successfully, but these errors were encountered: