mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add a hook option that allows stdout to be printed when exit code is 0 (#695)
This commit is contained in:
parent
7f0b427b74
commit
b319d6f80c
4 changed files with 23 additions and 1 deletions
|
|
@ -130,7 +130,10 @@ def _run_single_hook(filenames, hook, repo, args, skips, cols):
|
|||
|
||||
output.write_line(color.format_color(pass_fail, print_color, args.color))
|
||||
|
||||
if (stdout or stderr or file_modifications) and (retcode or args.verbose):
|
||||
if (
|
||||
(stdout or stderr or file_modifications) and
|
||||
(retcode or args.verbose or hook['verbose'])
|
||||
):
|
||||
output.write_line('hookid: {}\n'.format(hook['id']))
|
||||
|
||||
# Print a message if failing due to file modifications
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue