Skip to content

Commit 0e07073

Browse files
committed
Always return full path to git dir
1 parent 0aca132 commit 0e07073

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git-hooks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function spawnHook(hookName, args) {
179179
*/
180180
function getClosestGitPath(currentPath) {
181181
try {
182-
var result = execSync('git rev-parse --git-dir', {cwd: currentPath}).toString();
182+
var result = execSync('git rev-parse --absolute-git-dir', {cwd: currentPath}).toString();
183183
return result.replace(/\n/g, '');
184184
} catch (error) {
185185
if (error.status === 128) {

0 commit comments

Comments
 (0)