From 37231d999195c8c7eca170db587ed4dcfc9d7dc1 Mon Sep 17 00:00:00 2001 From: maziggy Date: Fri, 24 Apr 2026 10:34:23 +0200 Subject: [PATCH] Updated install/install.sh --- install/install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install/install.sh b/install/install.sh index c60d95503..4746cc928 100755 --- a/install/install.sh +++ b/install/install.sh @@ -354,9 +354,12 @@ download_bambuddy() { # Ensure correct ownership after update sudo chown -R "$SERVICE_USER:$SERVICE_USER" "$INSTALL_PATH" 2>/dev/null || true else + # Clone as root so we have write access regardless of the installing user, + # then hand ownership to the service user. Previously we chown'd the empty + # dir to the service user before the clone, which left the install-running + # user (not root, not bambuddy) unable to write .git into it. sudo mkdir -p "$INSTALL_PATH" - sudo chown "$SERVICE_USER:$SERVICE_USER" "$INSTALL_PATH" 2>/dev/null || true - git clone --branch "$BRANCH" https://github.com/maziggy/bambuddy.git "$INSTALL_PATH" + sudo git clone --branch "$BRANCH" https://github.com/maziggy/bambuddy.git "$INSTALL_PATH" sudo chown -R "$SERVICE_USER:$SERVICE_USER" "$INSTALL_PATH" 2>/dev/null || true fi