We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d65a692 commit 07417d1Copy full SHA for 07417d1
simple-git-hooks.js
@@ -59,7 +59,7 @@ function getGitProjectRoot(directory=process.cwd()) {
59
if (fs.existsSync(fullPath)) {
60
if(!fs.lstatSync(fullPath).isDirectory()) {
61
let content = fs.readFileSync(fullPath, { encoding: 'utf-8' })
62
- let match = /^gitdir: (.*)\s*$/.exec(content)
+ let match = /^gitdir: (.*\.git)((\/.*)|(\s*))/.exec(content)
63
if (match) {
64
return path.normalize(match[1])
65
}
0 commit comments