Fix git safe.directory error on upgrade

When running as root on an existing install, git refuses to operate on
a repo owned by a different user. Mark the install dir as safe before pulling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-07-14 10:58:37 -04:00
1 parent 16ab65d4ec
commit c1b7dcacb7
1 file changed
+1
+1
View File
@@ -66,6 +66,7 @@ ok "git $(git --version | awk '{print $3}')"
# ── Clone / update ──────────────────────────────────────────────────────────── # ── Clone / update ────────────────────────────────────────────────────────────
if [ -d "$INSTALL_DIR/.git" ]; then if [ -d "$INSTALL_DIR/.git" ]; then
info "Updating existing installation at $INSTALL_DIR..." info "Updating existing installation at $INSTALL_DIR..."
git config --global --add safe.directory "$INSTALL_DIR" 2>/dev/null || true
git -C "$INSTALL_DIR" pull --ff-only git -C "$INSTALL_DIR" pull --ff-only
else else
info "Cloning to $INSTALL_DIR..." info "Cloning to $INSTALL_DIR..."