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

ggshield install --mode local installs in the wrong directory #989

Open
cfrenkel-mdsol opened this issue Oct 22, 2024 · 0 comments
Open
Labels
status:new This issue needs to be reviewed type:bug Something isn't working

Comments

@cfrenkel-mdsol
Copy link

cfrenkel-mdsol commented Oct 22, 2024

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:

  1. cd to a sub-directory
  2. Run command ggshield install --mode=local -t pre-commit

core.hookspath not being honored

  1. git config set core.hookspath=githooks
  2. (optionally) cd to a sub-directory
  3. 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.

@cfrenkel-mdsol cfrenkel-mdsol added status:new This issue needs to be reviewed type:bug Something isn't working labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new This issue needs to be reviewed type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant