question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: read core.hooksPath from git config during `gitmoji -i`

See original GitHub issue

Hello @carloscuesta!

Issue:

gitmoji -i currently creates a prepare-commit-msg file under the hardcoded .git/hooks path, which is the default path for git hooks. However, this path can be configured git config --set core.hooksPath path/to/hooks/folder and this is what for instance husky v6 started to do.

Would it be possible to create that file at the local config path instead, accessible by running git config --get core.hooksPath? (using child_process.spawnSync or such perhaps?)

OS: Mac OS 11.2.3 gitmoji -v: 3.3.1 Node version: 14.16.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
carloscuestacommented, Apr 25, 2021

Turns out I forgot to execute the build script before publishing 😅. I automated this on a PR to never forgot it again

1reaction
carloscuestacommented, Apr 18, 2021

Thanks for the help @flo-sch

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git hooks : applying `git config core.hooksPath` - Stack Overflow
running git config --get core.hooksPath in my-repo outputs ./git-config/hooks. How can I make the new pre-commit hook ...
Read more >
hooks - Git - githooks Documentation
Hooks are programs you can place in a hooks directory to trigger actions at certain points in ... hooksPath configuration variable (see git-config[1])....
Read more >
A global git-hooks directory defined in a global .gitconfig file ...
Inside of this git-hooks directory I currently have 1 hook named prepare-commit-msg . If I comment out the core.hookspath property in my ~/....
Read more >
Support core.hooksPath - GitKraken User Suggestions
The core.hooksPath config allows you to set a directory where the hooks are located for a repository. This is particularly useful if trying ......
Read more >
Support git config core.hooksPath : IDEA-193572 - YouTrack
What steps will reproduce the issue? Create a ".hooks" directory in your project main directory and create a pre-commit hook inside; Run "git...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found