mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
give docker a tty output when expecting color
this makes the behavior more consistent with the system language and would help the executable run in a docker container to produce a colored output.
This commit is contained in:
parent
7b868c3508
commit
e58009684c
3 changed files with 32 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ def run_hook(
|
|||
require_serial: bool,
|
||||
color: bool,
|
||||
) -> tuple[int, bytes]: # pragma: win32 no cover
|
||||
cmd = docker_cmd() + lang_base.hook_cmd(entry, args)
|
||||
cmd = docker_cmd(color=color) + lang_base.hook_cmd(entry, args)
|
||||
return lang_base.run_xargs(
|
||||
cmd,
|
||||
file_args,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue