Skip to content

Commit ffaf054

Browse files
Kreyrenakinomyoga
authored andcommitted
lib/utils: Simplify "_omb_log_die"
1 parent a0a7dbc commit ffaf054

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/utils.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,7 @@ _omb_util_command_exists _omb_log_note ||
189189
_omb_util_command_exists _omb_log_info ||
190190
_omb_log_info() { printf "INFO: %s\n" "$1"; }
191191
_omb_util_command_exists _omb_log_die ||
192-
_omb_log_die() {
193-
local status=$1
194-
case $status in
195-
1) printf 'FATAL: %s\n' "$2"
196-
exit "$status" ;;
197-
*) printf 'FATAL: Syntax error%s\n%s\n' "${FUNCNAME:+ in $FUNCNAME}" "$2"
198-
((status)) && printf 'FATAL: %s\n' "$status"
199-
return "$status" ;;
200-
esac
201-
}
192+
_omb_log_die() { printf 'FATAL: %s\n' "$2"; exit "$1"; }
202193

203194
#
204195
# USAGE FOR SEEKING CONFIRMATION

0 commit comments

Comments
 (0)