From 0572706e4790de0a492a6e76a002fd3be6a2b5d1 Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Tue, 10 Mar 2015 22:36:24 -0400 Subject: [PATCH] better handling of script exit when 'die' is used --- lib/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.sh b/lib/utils.sh index ec4da97..fe40a57 100755 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -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)"; }