summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2017-11-09 17:01:31 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2017-11-09 17:23:24 +0530
commit210fdf158993d0c0a17e81fd7278e644b3242366 (patch)
tree5a51145f7ac6d87d6739dcd357eae7ff9b834d1f /src
parentcecd33ef243f0bdbc08e1252259bb6bfd503bf11 (diff)
make pre-receive repo-specific hooks bail on non-zero exit
Diffstat (limited to 'src')
-rwxr-xr-xsrc/triggers/repo-specific-hooks4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/triggers/repo-specific-hooks b/src/triggers/repo-specific-hooks
index bba7a58..a4c86cc 100755
--- a/src/triggers/repo-specific-hooks
+++ b/src/triggers/repo-specific-hooks
@@ -111,8 +111,8 @@ for h in $0.*; do
[ -x $h ] || continue
if [ $type = args ]
then
- $h $@
+ $h $@ || { [ $0 = hooks/pre-receive ] && exit 1; }
else
- echo "$stdin" | $h
+ echo "$stdin" | $h || { [ $0 = hooks/pre-receive ] && exit 1; }
fi
done