Closed sawa-ko closed 1 month ago
Hey! Could you share your lefthook.yml
config?
Hi @mrexox, here my lefhook.yml
file
pre-commit:
parallel: true
commands:
check:
glob: "*.{ts,tsx}"
run: npx lint-staged --allow-empty && git update-index --again
commit-msg:
scripts:
"commitlint.sh":
runner: bash
post-commit:
commands:
git-update-index:
run: git update-index --again
Thank you. Could you please show what this git command displays?
git rev-parse --git-path hooks
I assume that hooks path may be configured the wrong way, because this bug does not reproduces for my local setup.
Hi @mrexox, the response of the command is this:
@sawa-ko , I think you should setup your hooksPath
setting for the project or globally.
Consider chaning --local
to --global
if the setting is global. I think that this configuration may be either in yout ~/.gitconfig
or in your project's .git/config
file.
git config --local core.hooksPath .git/hooks/
:wrench: Summary
When I run the command
lefthook install
(using pnpm exec) a folder named--help
is created.Lefthook version
1.7.2
Steps to reproduce
lefthook
lefthook install
--help
folder created by lefthookExpected results
Some
.lefthook
folder or something like that and not a folder named--help
.Actual results
A folder named
--help
Possible Solution
Logs / Screenshots
https://github.com/user-attachments/assets/f6904342-a17c-4b7a-967a-21d282395dda