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

lefthook install fails when .git/info dir is missing #413

Closed
sato11 opened this issue Jan 7, 2023 · 0 comments · Fixed by #414
Closed

lefthook install fails when .git/info dir is missing #413

sato11 opened this issue Jan 7, 2023 · 0 comments · Fixed by #414
Labels
bug Something isn't working

Comments

@sato11
Copy link
Contributor

sato11 commented Jan 7, 2023

🔧 Summary

lefthook install fails when .git/info dir is missing. Workaround is that you mkdir .git/info before running it.

I reckon it a bug as the info dir is not provisioned by default when you just git init in git version 2.39.0. Although I'm not really sure if this is specific to my environment or if there's config by which the info dir is automatically made available, I'd like the fresh installation to run agnostic about it.

Lefthook version

1.2.6 7fa22dd

Steps to reproduce

In any directory run git init and lefthook install.

Expected results

% lefthook install
SYNCING
SERVED HOOKS: pre-commit, pre-push

Actual results

SYNCING
Error: open .git/info/lefthook.checksum: no such file or directory

Possible Solution

I have a working fix and am going to open a PR followingly.

Screenshots (if appropriate)

@sato11 sato11 added the bug Something isn't working label Jan 7, 2023
sato11 added a commit to sato11/lefthook that referenced this issue Jan 7, 2023
@mrexox mrexox closed this as completed in 82f8a08 Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant