Fix shellcheck warning variable declaration

This commit is contained in:
buildplan
2025-10-20 17:06:21 +01:00
committed by GitHub
parent 606eba1e57
commit 41166e6830

View File

@@ -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"