Permalink
Browse files

git-hooks: use abspaths when determining repo_root

  • Loading branch information...
1 parent 2bee8d0 commit d5d3e88c8d3add7aa2f8ba35e1961f57df830f53 @jtriley committed Mar 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 git-hooks/pre-commit
View
@@ -2,8 +2,8 @@
import os
import sys
-hook_dir = os.path.dirname(__file__)
-repo_root = os.path.abspath(os.path.join('..', '..', hook_dir))
+hook_dir = os.path.abspath(os.path.dirname(__file__) or '.')
+repo_root = os.path.abspath(os.path.join(hook_dir, '..', '..'))
sys.path.append(repo_root)
import check

0 comments on commit d5d3e88

Please sign in to comment.