mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
check cygwin mismatch earlier
This commit is contained in:
parent
3e2b9dc91a
commit
91530f1005
7 changed files with 33 additions and 32 deletions
|
|
@ -7,14 +7,11 @@ from typing import Generator
|
|||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit import output
|
||||
from pre_commit.errors import FatalError
|
||||
from pre_commit.store import Store
|
||||
from pre_commit.util import force_bytes
|
||||
|
||||
|
||||
class FatalError(RuntimeError):
|
||||
pass
|
||||
|
||||
|
||||
def _log_and_exit(msg: str, exc: BaseException, formatted: str) -> None:
|
||||
error_msg = f'{msg}: {type(exc).__name__}: '.encode() + force_bytes(exc)
|
||||
output.write_line_b(error_msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue