mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-28 20:08:32 -06:00
Uninstall restores hooks.
This commit is contained in:
@@ -61,4 +61,9 @@ def uninstall(runner):
|
||||
if os.path.exists(runner.pre_commit_path):
|
||||
os.remove(runner.pre_commit_path)
|
||||
print('pre-commit uninstalled')
|
||||
|
||||
if os.path.exists(runner.pre_commit_legacy_path):
|
||||
os.rename(runner.pre_commit_legacy_path, runner.pre_commit_path)
|
||||
print('Restored previous hooks to {0}'.format(runner.pre_commit_path))
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user