Skip to content

Commit 35f18b1

Browse files
author
holtwilkins
committed
Update pre-commit
readlink by itself here doesn't work properly if you have relative paths in your symlink. I believe readlink -f will be better here.
1 parent 343f77a commit 35f18b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RC=0
77
subhook_root=$git_root/.git/hooks/commit_hooks
88

99
hook_dir="$(dirname $0)"
10-
hook_symlink="$(readlink $0)"
10+
hook_symlink="$(readlink -f $0)"
1111

1212
# Figure out where commit hooks are if pre-commit is setup as a symlink
1313
if [ ! -z "$hook_symlink" ]; then

0 commit comments

Comments
 (0)