From 066cee66a847bbfca432012e09671ac1492a9c3f Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Mon, 21 Apr 2025 12:46:30 +0100 Subject: [PATCH] fix(script): Run git pull as pulse user during update --- scripts/install-pulse.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install-pulse.sh b/scripts/install-pulse.sh index 691482aa2..75054da85 100644 --- a/scripts/install-pulse.sh +++ b/scripts/install-pulse.sh @@ -131,8 +131,9 @@ perform_update() { print_info "Attempting to update Pulse..." cd "$PULSE_DIR" || { print_error "Failed to change directory to $PULSE_DIR"; return 1; } - print_info "Fetching latest changes from git..." - if ! git pull origin main; then + print_info "Fetching latest changes from git (running as user $PULSE_USER)..." + # Run git pull as the pulse user to avoid ownership issues + if ! sudo -u "$PULSE_USER" git pull origin main; then print_error "Failed to pull latest changes from git." cd .. return 1