#!/bin/bash set -e TARGET_FILE="/home/user/app/app2.py" echo "🔍 Normalizing indentation in $TARGET_FILE..." # 1. Convert ALL tabs in the entire file into 4 spaces expand --tabs=4 "$TARGET_FILE" > "${TARGET_FILE}.fixed" # 2. Replace original file with fixed version mv "${TARGET_FILE}.fixed" "$TARGET_FILE" # 3. Double check for stray carriage returns (\r), just in case sed -i 's/\r$//' "$TARGET_FILE" echo "✅ All tabs converted to spaces, indentation clean. Retrying app launch should now succeed."