From c947a0935d143b01c2d91243be660789eb655626 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 17 Jul 2018 16:40:57 -0700 Subject: [PATCH] Fix buffering in --show-diff-on-failure --- pre_commit/commands/run.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index b5dcc1e2..b1549d41 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -1,4 +1,3 @@ -from __future__ import print_function from __future__ import unicode_literals import logging @@ -205,7 +204,7 @@ def _run_hooks(config, repo_hooks, args, environ): args.show_diff_on_failure and subprocess.call(('git', 'diff', '--quiet', '--no-ext-diff')) != 0 ): - print('All changes made by hooks:') + output.write_line('All changes made by hooks:') subprocess.call(('git', '--no-pager', 'diff', '--no-ext-diff')) return retval