mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
clean: separate store from runner
This commit is contained in:
parent
0e430be0ce
commit
6d683a5fac
4 changed files with 12 additions and 21 deletions
|
|
@ -7,9 +7,9 @@ from pre_commit import output
|
|||
from pre_commit.util import rmtree
|
||||
|
||||
|
||||
def clean(runner):
|
||||
def clean(store):
|
||||
legacy_path = os.path.expanduser('~/.pre-commit')
|
||||
for directory in (runner.store.directory, legacy_path):
|
||||
for directory in (store.directory, legacy_path):
|
||||
if os.path.exists(directory):
|
||||
rmtree(directory)
|
||||
output.write_line('Cleaned {}.'.format(directory))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue