Exit with error code

This commit is contained in:
2019-06-11 15:01:41 +02:00
parent 703c0e8182
commit 8914cd99b3

View File

@@ -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