feat: add log-file arg

This commit is contained in:
Jeremie Feron 2023-08-15 22:29:15 +02:00
parent a1f1d19156
commit 03c592cbd4

View file

@ -69,6 +69,10 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None:
'--files', nargs='*', default=[], '--files', nargs='*', default=[],
help='Specific filenames to run hooks on.', help='Specific filenames to run hooks on.',
) )
parser.add_argument(
'--log-file', type=str,
help='Save failed/passed logs to a log file.',
)
parser.add_argument( parser.add_argument(
'--show-diff-on-failure', action='store_true', '--show-diff-on-failure', action='store_true',
help='When hooks fail, run `git diff` directly afterward.', help='When hooks fail, run `git diff` directly afterward.',