mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 21:10:27 -06:00
show color in hook outputs when attached to a tty
This commit is contained in:
@@ -78,6 +78,6 @@ def install_environment(
|
||||
)
|
||||
|
||||
|
||||
def run_hook(hook, file_args): # pragma: windows no cover
|
||||
def run_hook(hook, file_args, color): # pragma: windows no cover
|
||||
with in_env(hook.prefix, hook.language_version):
|
||||
return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
|
||||
return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
|
||||
|
||||
Reference in New Issue
Block a user