Skip to content

Commit 2abd42b

Browse files
committed
Merge pull request #64 from kevinoid/relative-link
Make pre-commit hook symlink relative
2 parents 2ca2fb9 + 1a04430 commit 2abd42b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ catch (e) {}
5252
// installation of this module to completely fail. We should just output the
5353
// error instead destroying the whole npm install process.
5454
//
55-
try { fs.symlinkSync(hook, precommit, 'file'); }
55+
try { fs.symlinkSync(path.relative(hooks, hook), precommit, 'file'); }
5656
catch (e) {
5757
console.error('pre-commit:');
5858
console.error('pre-commit: Failed to symlink the hook file in your .git/hooks folder because:');

0 commit comments

Comments
 (0)