mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Output a message when a hook fails due to file modification
This commit is contained in:
parent
c6200329a2
commit
91a547ed61
4 changed files with 36 additions and 7 deletions
6
testing/resources/modified_file_returns_zero_repo/bin/hook3.sh
Executable file
6
testing/resources/modified_file_returns_zero_repo/bin/hook3.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
for f in $@; do
|
||||
# Non UTF-8 bytes
|
||||
echo -e '\x01\x97' > "$f"
|
||||
done
|
||||
|
|
@ -2,9 +2,14 @@
|
|||
name: Bash hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: ''
|
||||
files: 'foo.py'
|
||||
- id: bash_hook2
|
||||
name: Bash hook
|
||||
entry: bin/hook2.sh
|
||||
language: script
|
||||
files: ''
|
||||
- id: bash_hook3
|
||||
name: Bash hook
|
||||
entry: bin/hook3.sh
|
||||
language: script
|
||||
files: 'bar.py'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue