Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

git-hooks: use abspaths when determining repo_root

  • Loading branch information...
commit d5d3e88c8d3add7aa2f8ba35e1961f57df830f53 1 parent 2bee8d0
@jtriley authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 git-hooks/pre-commit
View
4 git-hooks/pre-commit
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.