mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-11 14:33:47 -05:00
better handling of script exit when 'die' is used
This commit is contained in:
@@ -69,7 +69,7 @@ function _alert() { #my function
|
||||
|
||||
}
|
||||
|
||||
function die () { local _message="${@} Exiting."; echo "$(_alert emergency)"; exit 1;}
|
||||
function die () { local _message="${@} Exiting."; echo "$(_alert emergency)"; safeExit;}
|
||||
function error () { local _message="${@}"; echo "$(_alert error)"; }
|
||||
function warning () { local _message="${@}"; echo "$(_alert warning)"; }
|
||||
function notice () { local _message="${@}"; echo "$(_alert notice)"; }
|
||||
|
||||
Reference in New Issue
Block a user