Skip to content

Commit 41b518f

Browse files
committed
Add a failsafe for _original_debug_mode
1 parent 89e6956 commit 41b518f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

install/assets/functions/10-db-backup

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,16 +1096,17 @@ db_backup_container_init() {
10961096
debug() {
10971097
case "${1}" in
10981098
off)
1099-
DEBUG_MODE=${OLD_DEBUG_MODE}
1099+
DEBUG_MODE=${_original_debug_mode}
11001100
if var_true "${DEBUG_MODE}" ; then
11011101
set -x
11021102
else
11031103
set +x
11041104
fi
1105-
11061105
;;
11071106
on)
1108-
OLD_DEBUG_MODE=${DEBUG_MODE}
1107+
if [ -z "${_original_debug_mode}" ]; then
1108+
_original_debug_mode="${DEBUG_MODE}"
1109+
fi
11091110
set -x
11101111
;;
11111112
esac

0 commit comments

Comments
 (0)