From e798f138bca270a68467aad5808cd1fe83ab70fb Mon Sep 17 00:00:00 2001 From: femsci Date: Wed, 28 Dec 2022 11:04:44 +0100 Subject: [PATCH] Change hook fail to warn. --- hooks/_init.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hooks/_init.sh b/hooks/_init.sh index f6074d3..9bbea43 100755 --- a/hooks/_init.sh +++ b/hooks/_init.sh @@ -29,7 +29,12 @@ perror() { } err_trap() { - perror "Error during execution of $EXEC_NAME." + LAST=$? + if [[ $LAST -lt 0 ]]; then + perror "Error during execution of $EXEC_NAME." + elif [[ $LAST -gt 0 ]]; then + pwarn "Hook $EXEC_NAME finished unsuccessfully." + fi } export -f pinfo pwarn perror