From 8914cd99b3bce17ebc0357e67996b4113df1b0e6 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 11 Jun 2019 15:01:41 +0200 Subject: [PATCH] Exit with error code --- bin/update | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/update b/bin/update index a3a0969..4e72c21 100755 --- a/bin/update +++ b/bin/update @@ -398,8 +398,9 @@ main() { if [ $# -eq 0 ]; then _lock_or_error_message - if [ $? -ne 0 ]; then - return $? + local error_code=$? + if [ $error_code -ne 0 ]; then + exit $error_code fi local start=`date +%s` @@ -467,8 +468,9 @@ main() { if [ $lock_required -eq 0 ]; then _lock_or_error_message - if [ $? -ne 0 ]; then - return $? + local error_code=$? + if [ $error_code -ne 0 ]; then + exit $error_code fi fi