Do not overwrite Git pre-commit hook; closes #149

This commit is contained in:
Florent Xicluna 2014-05-05 21:34:21 +02:00
parent d67491a104
commit 6c395673e2
2 changed files with 3 additions and 1 deletions

View file

@ -228,6 +228,8 @@ def install_hook():
status = 0
if 'git' in vcs:
if os.path.exists(vcs):
sys.exit('Error: hook already exists (%s)' % vcs)
with open(vcs, 'w') as fd:
fd.write(git_hook_file)
# rwxr--r--