Skip to content

Commit 550ce26

Browse files
authored
Merge pull request pre-commit#796 from pre-commit/buffering
Fix buffering in --show-diff-on-failure
2 parents df1b720 + c947a09 commit 550ce26

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pre_commit/commands/run.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
from __future__ import unicode_literals
32

43
import logging
@@ -205,7 +204,7 @@ def _run_hooks(config, repo_hooks, args, environ):
205204
args.show_diff_on_failure and
206205
subprocess.call(('git', 'diff', '--quiet', '--no-ext-diff')) != 0
207206
):
208-
print('All changes made by hooks:')
207+
output.write_line('All changes made by hooks:')
209208
subprocess.call(('git', '--no-pager', 'diff', '--no-ext-diff'))
210209
return retval
211210

0 commit comments

Comments
 (0)