Adds support for 'log_file' in hook config

Specify a filename on a per hook basis and
pre-commit will write the STDOUT and STDERR
of that hook into the file. Useful for CI.

Resolves #499.
This commit is contained in:
Alex Hutton
2017-05-04 15:45:05 +10:00
committed by Alex Hutton
parent 5d43b05bd3
commit f2644a4f2e
6 changed files with 59 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
- id: logfile test hook
name: Logfile test hook
entry: bin/hook.sh
language: script
files: .
log_file: test.log

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
echo "This is STDOUT output"
echo "This is STDERR output" 1>&2
exit 1