From 210fdf158993d0c0a17e81fd7278e644b3242366 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 9 Nov 2017 17:01:31 +0530 Subject: make pre-receive repo-specific hooks bail on non-zero exit --- src/triggers/repo-specific-hooks | 4 ++-- 1 file 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 -- cgit v1.2.3-65-gdbad