Exit with error code

This commit is contained in:
Thomas Forgione 2019-06-11 15:01:41 +02:00
parent 703c0e8182
commit 8914cd99b3
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 6 additions and 4 deletions

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