-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feature: add HUSKY_SKIP_HOOKS support #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 |
Disable prepare-commit-msg hook to avoid `standard-version` to hang. Waiting for this issue to be closed typicode/husky#487.
Hi Guys, |
Thanks again @ozzywalsh for the PR, it'll be released soon. |
Is there a way to run |
@davinanaya I add some script to pre-commit hook BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
if [[ $BRANCH_NAME =~ "no branch" ]]; then
echo "You are rebasing, skipping hook"
exit 0
fi |
In case you got here like I did and you're looking for what to do currently, then instead use |
When rebasing, it may be useful to be able to temporarily disable hooks. Unfortunately, it's not possible to do it with
git rebase --no-verify
,pre-commit
hook is still run.A test should be added in https://github.com/typicode/husky/blob/master/src/installer/getScript.ts#L54 to verify if
HUSKY_SKIP_HOOKS
is set to1
ortrue
, if that's the case the hook should display some message and exit.Ideally a test could be added in https://github.com/typicode/husky/blob/master/.travis.yml to verify that hooks are skipped. Something like:
Related issues:
#468
#447
The text was updated successfully, but these errors were encountered: