-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
gerrit commit-msg hook failed in v9 #1424
Comments
I have the same problem, after upgrading husky to v9, the commit-msg doesn't work. |
try to call this git hook inside the husky commit-msg hook: .husky/commit-msg it worked for me hope it works for you too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1、I work on window 10, my project code is mangaed by gerrit (for code review)
2、So I have two hook to work
①、pre-commit, for eslint check before commit
②、commit-msg, for add commit id to commit-msg before push to gerrit
it works well in husky v8
3、after upgrading to v9,I update pre-commit hook code from
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh
npx --no-install lint-staged -q
to
npx --no-install lint-staged -q
it works fine
4、but commit-msg hook alway failed, it output as following:
husky - commit-msg script failed (code 1)
5、this is my commit-msg hook code, how can i fix it
(I rename the file name from 'commit-msg' to 'commit-msg.txt')
commit-msg.txt
The text was updated successfully, but these errors were encountered: