Skip to content

Commit

Permalink
lib/utils: Simplify "_omb_log_die"
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyren authored and akinomyoga committed Oct 15, 2023
1 parent 29bcd14 commit 71b2d2e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,7 @@ _omb_util_command_exists _omb_log_note ||
_omb_util_command_exists _omb_log_info ||
function _omb_log_info { printf "INFO: %s\n" "$1"; }
_omb_util_command_exists _omb_log_die ||
function _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
}
function _omb_log_die { printf 'FATAL: %s\n' "$2"; exit "$1"; }

#
# USAGE FOR SEEKING CONFIRMATION
Expand Down

0 comments on commit 71b2d2e

Please sign in to comment.