Closed brentgreeff closed 1 month ago
Hmmm, it seems that my the hook is being saved under .husky
- is this project a fork of husky?
that dir name is not intuitive.
and - core.hookspath=.husky/_
is set in git config.
Hey! Lefthook is not a husky fork. It uses git rev-parse --git-path hooks
command to detect where you store git hooks and looks like you have .husky/_
configured.
Do you have both lefthook and husky in the project?
Husky was removed - ie I deleted its files in the project.
but I just ran git config --unset core.hooksPath
and then lefthook install
and now my hooks are in .git/hooks/
:wrench: Summary
I have a git alias which evaluates to :
!git add . && git commit -v
The hooks runs most of the time, but if I commit something, the next commit, there is no hook.
Lefthook version
v1.7.18
Steps to reproduce
Expected results
Hook should always run.
Actual results
Often hook doesnt run, there is not output from lefthook.
Possible Solution
running
lefthook install
again fixes the issue.la .git/hooks/
does not have any hooks except samples, - I would expect to see the hook somewhere.Something else weird. I did try to use Husky before lefthook. I keep deleting the
.husky
dir. It keeps coming back.Logs / Screenshots