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

getGitHooksPath helper function #177

Merged
merged 2 commits into from
May 5, 2021

Conversation

charlie-wasp
Copy link
Contributor

@charlie-wasp charlie-wasp commented May 4, 2021

Resolves #170

This PR adds getGitHooksPath() helper as a source of truth about where git hooks are stored

It uses git rev-parse --git-path hooks command under the hood (kudos to @stevelacy for the hint!), so it considers possible overriding default .git/hooks too

This is my first PR to the repo, so please, let me know, if I can improve it in any way

@charlie-wasp charlie-wasp marked this pull request as ready for review May 4, 2021 07:49
cmd/cmd_test.go Outdated Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
@charlie-wasp
Copy link
Contributor Author

@DmitryTsepelev thanks for pointing out that formatting issues. I applied gofmt, so a couple of formatting changes appeared, which are not relevant to my code. Hope, it's not a problem

cmd/cmd_test.go Show resolved Hide resolved
@Envek Envek merged commit b510d22 into evilmartians:master May 5, 2021
@Envek
Copy link
Member

Envek commented May 14, 2021

Released in 0.7.5. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom hooks path isn't supported
4 participants