fix(script): Prevent git clean from removing ignored .env file

This commit is contained in:
courtmanr@gmail.com
2025-04-23 20:22:37 +01:00
parent 5dfac8582d
commit d7539ab43d
+2 -2
View File
@@ -167,8 +167,8 @@ perform_update() {
print_info "Cleaning repository (removing untracked files)..."
# Remove untracked files and directories to ensure a clean state
# Use with caution if user might store custom untracked files in the directory
if ! sudo -u "$PULSE_USER" git clean -fdx; then
# Use -f for files, -d for directories. Do NOT use -x which removes ignored files like .env
if ! sudo -u "$PULSE_USER" git clean -fd; then
print_warning "Failed to clean untracked files from the repository."
# Continue anyway, as the core update (reset) succeeded
fi