mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Combine install and uninstall.
This commit is contained in:
parent
ac735e85e2
commit
f4d16b9cdc
5 changed files with 31 additions and 44 deletions
|
|
@ -54,3 +54,11 @@ def install(runner, overwrite=False):
|
|||
|
||||
print('pre-commit installed at {0}'.format(runner.pre_commit_path))
|
||||
return 0
|
||||
|
||||
|
||||
def uninstall(runner):
|
||||
"""Uninstall the pre-commit hooks."""
|
||||
if os.path.exists(runner.pre_commit_path):
|
||||
os.remove(runner.pre_commit_path)
|
||||
print('pre-commit uninstalled')
|
||||
return 0
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
|
||||
def uninstall(runner):
|
||||
"""Uninstall the pre-commit hooks."""
|
||||
if os.path.exists(runner.pre_commit_path):
|
||||
os.remove(runner.pre_commit_path)
|
||||
print('pre-commit uninstalled')
|
||||
return 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue