Skip to content

Commit be3a4f8

Browse files
committed
Always return full path to git dir
1 parent c4b2add commit be3a4f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git-hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function spawnHook(hookName, args) {
173173
*/
174174
function getClosestGitPath(currentPath) {
175175
try {
176-
var result = execSync('git rev-parse --git-dir', {cwd: currentPath}).toString();
176+
var result = execSync('git rev-parse --absolute-git-dir', {cwd: currentPath}).toString();
177177
return result.replace(/\n/g, '');
178178
} catch (error) {
179179
if (error.status === 128) {

0 commit comments

Comments
 (0)