Skip to content

Commit

Permalink
Add a failsafe for _original_debug_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Nov 9, 2023
1 parent 89e6956 commit 41b518f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions install/assets/functions/10-db-backup
Original file line number Diff line number Diff line change
Expand Up @@ -1096,16 +1096,17 @@ db_backup_container_init() {
debug() {
case "${1}" in
off)
DEBUG_MODE=${OLD_DEBUG_MODE}
DEBUG_MODE=${_original_debug_mode}
if var_true "${DEBUG_MODE}" ; then
set -x
else
set +x
fi

;;
on)
OLD_DEBUG_MODE=${DEBUG_MODE}
if [ -z "${_original_debug_mode}" ]; then
_original_debug_mode="${DEBUG_MODE}"
fi
set -x
;;
esac
Expand Down

0 comments on commit 41b518f

Please sign in to comment.