Installation command creates a folder named --help
sawa-ko opened this issue · 5 comments
sawa-ko commented
🔧 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
- Install
lefthook
- Use the command
lefthook install
- See the
--help
folder created by lefthook
Expected results
Some .lefthook
folder or something like that and not a folder named --help
.
Actual results
A folder named --help
Possible Solution
Logs / Screenshots
Grabacion.de.pantalla.2024-07-11.135913.mp4
LEFTHOOK_VERBOSE=true git ...
mrexox commented
Hey! Could you share your lefthook.yml
config?
sawa-ko commented
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
mrexox commented
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.
mrexox commented
@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/