fix: unset color variables before sourcing .env to prevent ANSI escape sequence errors

This commit is contained in:
Muhammad Ibrahim
2025-10-28 18:21:52 +00:00
parent 746451c296
commit eb0218bdcb

View File

@@ -2931,6 +2931,8 @@ update_installation() {
# Load existing .env to get database credentials # Load existing .env to get database credentials
if [ -f "$instance_dir/backend/.env" ]; then if [ -f "$instance_dir/backend/.env" ]; then
# Unset color variables before sourcing to prevent ANSI escape sequences from leaking into .env
unset RED GREEN YELLOW BLUE NC
source "$instance_dir/backend/.env" source "$instance_dir/backend/.env"
print_status "Loaded existing configuration" print_status "Loaded existing configuration"