mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 08:34:41 +04:00
Reorganize output writing
This commit is contained in:
parent
1adfa24124
commit
0dda19f691
20 changed files with 202 additions and 142 deletions
|
|
@ -3,11 +3,12 @@ from __future__ import unicode_literals
|
|||
|
||||
import os.path
|
||||
|
||||
from pre_commit import output
|
||||
from pre_commit.util import rmtree
|
||||
|
||||
|
||||
def clean(runner):
|
||||
if os.path.exists(runner.store.directory):
|
||||
rmtree(runner.store.directory)
|
||||
print('Cleaned {}.'.format(runner.store.directory))
|
||||
output.write_line('Cleaned {}.'.format(runner.store.directory))
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue