From ffaf05401bd211e490dcc3df57abcd4b036a08f9 Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Tue, 28 Dec 2021 14:26:00 +0200 Subject: [PATCH] lib/utils: Simplify "_omb_log_die" --- lib/utils.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/utils.sh b/lib/utils.sh index f08df5528..2013888e9 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -189,16 +189,7 @@ _omb_util_command_exists _omb_log_note || _omb_util_command_exists _omb_log_info || _omb_log_info() { printf "INFO: %s\n" "$1"; } _omb_util_command_exists _omb_log_die || - _omb_log_die() { - local status=$1 - case $status in - 1) printf 'FATAL: %s\n' "$2" - exit "$status" ;; - *) printf 'FATAL: Syntax error%s\n%s\n' "${FUNCNAME:+ in $FUNCNAME}" "$2" - ((status)) && printf 'FATAL: %s\n' "$status" - return "$status" ;; - esac - } + _omb_log_die() { printf 'FATAL: %s\n' "$2"; exit "$1"; } # # USAGE FOR SEEKING CONFIRMATION