Skip to content
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

Open
yaotusa opened this issue Apr 19, 2024 · 1 comment
Open

gerrit commit-msg hook failed in v9 #1424

yaotusa opened this issue Apr 19, 2024 · 1 comment

Comments

@yaotusa
Copy link

yaotusa commented Apr 19, 2024

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

@qmmr
Copy link

qmmr commented May 8, 2024

I have the same problem, after upgrading husky to v9, the commit-msg doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants