mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 22:04:17 +00:00
Do not overwrite Git pre-commit hook; closes #149
This commit is contained in:
parent
d67491a104
commit
6c395673e2
2 changed files with 3 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ CHANGES
|
||||||
|
|
||||||
- New option ``doctests`` to run Pyflakes checks on doctests too
|
- New option ``doctests`` to run Pyflakes checks on doctests too
|
||||||
- New option ``jobs`` to launch multiple jobs in parallel
|
- New option ``jobs`` to launch multiple jobs in parallel
|
||||||
- Fix Git and Mercurial hooks, issues #88, #133 and #148
|
- Fix Git and Mercurial hooks: issues #88, #133, #148 and #149
|
||||||
- Fix crashes with Python 3.4 by upgrading dependencies
|
- Fix crashes with Python 3.4 by upgrading dependencies
|
||||||
- Fix traceback when running tests with Python 2.6
|
- Fix traceback when running tests with Python 2.6
|
||||||
- Fix the setuptools command ``python setup.py flake8`` to read
|
- Fix the setuptools command ``python setup.py flake8`` to read
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,8 @@ def install_hook():
|
||||||
|
|
||||||
status = 0
|
status = 0
|
||||||
if 'git' in vcs:
|
if 'git' in vcs:
|
||||||
|
if os.path.exists(vcs):
|
||||||
|
sys.exit('Error: hook already exists (%s)' % vcs)
|
||||||
with open(vcs, 'w') as fd:
|
with open(vcs, 'w') as fd:
|
||||||
fd.write(git_hook_file)
|
fd.write(git_hook_file)
|
||||||
# rwxr--r--
|
# rwxr--r--
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue