mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Adhere to XDG specification for cache dir.
This commit is contained in:
parent
ef8347cf2d
commit
0120af56a7
9 changed files with 50 additions and 17 deletions
|
|
@ -28,10 +28,11 @@ def _log_and_exit(msg, exc, formatted):
|
|||
_to_bytes(exc), b'\n',
|
||||
))
|
||||
output.write(error_msg)
|
||||
output.write_line('Check the log at ~/.pre-commit/pre-commit.log')
|
||||
store = Store()
|
||||
store.require_created()
|
||||
with open(os.path.join(store.directory, 'pre-commit.log'), 'wb') as log:
|
||||
log_path = os.path.join(store.directory, 'pre-commit.log')
|
||||
output.write_line('Check the log at {}'.format(log_path))
|
||||
with open(log_path, 'wb') as log:
|
||||
output.write(error_msg, stream=log)
|
||||
output.write_line(formatted, stream=log)
|
||||
raise SystemExit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue