Open
Description
Environment
- ggshield version: 1.32.2
- Operating system (Linux, macOS, Windows): Windows
- Operating system version: Windows 10
- Python version: 3.12.5
Describe the bug
ggshield install -mode=local does not honor core.hookspath
And even with core.hookspath unset it will install the hooks in the current directory rather than in the repo root.
Steps to reproduce:
- cd to a sub-directory
- Run command
ggshield install --mode=local -t pre-commit
core.hookspath not being honored
- git config set core.hookspath=githooks
- (optionally) cd to a sub-directory
- Run command
ggshield install --mode=local -t pre-commit
Actual result:
ls .git/hooks
will show the hook
Expected result:
'ls $(git rev-parse --show-toplevel)/.git/hooks`
should show the hook
or if core.hookspath is set
ls $(git rev-parse --show-toplevel)/githooks
should show the hook
If applicable, add logs or screenshots to help explain your problem.