From 41166e683023fbc26efdefcdb14e4ab61897fe66 Mon Sep 17 00:00:00 2001 From: buildplan <170122315+buildplan@users.noreply.github.com> Date: Mon, 20 Oct 2025 17:06:21 +0100 Subject: [PATCH] Fix shellcheck warning variable declaration --- du_setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/du_setup.sh b/du_setup.sh index 3d96987..6e433f9 100644 --- a/du_setup.sh +++ b/du_setup.sh @@ -2248,7 +2248,8 @@ EOF log "Successfully created temporary .bashrc source at $temp_source_bashrc" if [[ -f "$BASHRC_PATH" ]] && ! grep -q "generated by /usr/sbin/adduser" "$BASHRC_PATH" 2>/dev/null; then - local BASHRC_BACKUP="$BASHRC_PATH.backup_$(date +%Y%m%d_%H%M%S)" + local BASHRC_BACKUP + BASHRC_BACKUP="$BASHRC_PATH.backup_$(date +%Y%m%d_%H%M%S)" print_info "Backing up existing non-default .bashrc to $BASHRC_BACKUP" cp "$BASHRC_PATH" "$BASHRC_BACKUP" log "Backed up existing .bashrc to $BASHRC_BACKUP"