From d7539ab43dfc1dd6e147e3d6d81663c5bf3a893b Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Wed, 23 Apr 2025 20:22:37 +0100 Subject: [PATCH] fix(script): Prevent git clean from removing ignored .env file --- scripts/install-pulse.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install-pulse.sh b/scripts/install-pulse.sh index 216fec51d..83ac32f30 100644 --- a/scripts/install-pulse.sh +++ b/scripts/install-pulse.sh @@ -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