Skip to content

Commit

Permalink
git-hooks: use abspaths when determining repo_root
Browse files Browse the repository at this point in the history
  • Loading branch information
jtriley committed Mar 27, 2012
1 parent 2bee8d0 commit d5d3e88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5d3e88

Please sign in to comment.