Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cold-falcons-pick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"simple-git-hooks": patch
---

fix: only get local `coore.hooksPath` config
2 changes: 1 addition & 1 deletion simple-git-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async function setHooksFromConfig(projectRootPath=process.cwd(), argv=process.ar
function _getHooksDirPath(projectRoot) {
const defaultHooksDirPath = path.join(projectRoot, '.git', 'hooks')
try {
const customHooksDirPath = execSync('git config core.hooksPath', {
const customHooksDirPath = execSync('git config --local core.hooksPath', {
cwd: projectRoot,
encoding: 'utf8'
}).trim()
Expand Down