clean: separate store from runner

This commit is contained in:
Anthony Sottile 2018-06-29 20:08:23 -07:00
parent 0e430be0ce
commit 6d683a5fac
4 changed files with 12 additions and 21 deletions

View file

@ -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))