Fix git safe.directory error for non-root users after install
Unit Tests / test (push) Successful in 8m55s
Unit Tests / test (push) Successful in 8m55s
The installer runs as root and chowns /opt/pic to the pic user. Any other user (roof, operator) running make update then hits "detected dubious ownership". Fix: add /opt/pic to system-wide git safe.directory after clone, and add same guard in make update. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -247,6 +247,9 @@ fi
|
||||
|
||||
# Ensure the pic user owns the directory
|
||||
chown -R "${PIC_USER}:${PIC_USER}" "$PIC_DIR"
|
||||
# Allow any user to run git commands in this directory (installer runs as root,
|
||||
# operators run as themselves — git safe.directory prevents ownership errors)
|
||||
git config --system --add safe.directory "$PIC_DIR" 2>/dev/null || true
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Step 5 — Run make install
|
||||
|
||||
Reference in New Issue
Block a user