From 4d966786d3cbbfdbe97f781a76fe358be0b43fe2 Mon Sep 17 00:00:00 2001 From: Bobby Date: Sat, 5 Nov 2022 00:55:02 -0400 Subject: refactor: Auto exit when any command fails --- commit.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'commit.sh') diff --git a/commit.sh b/commit.sh index 2743561..5093398 100755 --- a/commit.sh +++ b/commit.sh @@ -15,6 +15,8 @@ # This script should return 0 if the commit should proceed or 1 if # the commit should be aborted. +set -e + # Get the current branch name branch=$(git rev-parse --abbrev-ref HEAD) -- cgit v1.2.3