Fail a hook if it makes modifications. Resolves #285

This commit is contained in:
Anthony Sottile 2015-11-12 15:16:55 -08:00
parent 67f6f812c4
commit a3f78bc165
5 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
for f in $@; do
echo modified > "$f"
echo "Modified: $f!"
done

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
echo $@

View file

@ -0,0 +1,10 @@
- id: bash_hook
name: Bash hook
entry: bin/hook.sh
language: script
files: ''
- id: bash_hook2
name: Bash hook
entry: bin/hook2.sh
language: script
files: ''