From: Benjamin C Meyer Date: Thu, 24 Oct 2013 03:14:03 +0000 (-0400) Subject: In the event we can't rename hooks we should immediately fail. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1d2b74a54a69f741289b0cbebc47564043c5fe0d;p=git-hooks.git In the event we can't rename hooks we should immediately fail. Signed-off-by: Benjamin C Meyer --- diff --git a/git-hooks b/git-hooks index b42e465..ff15471 100755 --- a/git-hooks +++ b/git-hooks @@ -99,7 +99,9 @@ function install_hooks echo "hooks.old already exists, perhaps you already installed?" return 1 fi + set -e mv hooks hooks.old + set +e mkdir hooks cd hooks for file in applypatch-msg commit-msg post-applypatch post-checkout post-commit post-merge post-receive pre-applypatch pre-auto-gc pre-commit prepare-commit-msg pre-rebase pre-receive update pre-push