Add a failsafe for _original_debug_mode

This commit is contained in:
Dave Conroy
2023-11-08 18:18:05 -08:00
parent 89e6956cdd
commit 41b518f2f0

View File

@@ -1096,16 +1096,17 @@ db_backup_container_init() {
debug() { debug() {
case "${1}" in case "${1}" in
off) off)
DEBUG_MODE=${OLD_DEBUG_MODE} DEBUG_MODE=${_original_debug_mode}
if var_true "${DEBUG_MODE}" ; then if var_true "${DEBUG_MODE}" ; then
set -x set -x
else else
set +x set +x
fi fi
;; ;;
on) on)
OLD_DEBUG_MODE=${DEBUG_MODE} if [ -z "${_original_debug_mode}" ]; then
_original_debug_mode="${DEBUG_MODE}"
fi
set -x set -x
;; ;;
esac esac