We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
#!/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:
I have the same problem, after upgrading husky to v9, the commit-msg doesn't work.
Sorry, something went wrong.
try to call this git hook inside the husky commit-msg hook:
.husky/commit-msg .git/hooks/commit-msg "$1"
.git/hooks/commit-msg "$1"
it worked for me hope it works for you too.
No branches or pull requests
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: