Quellcode durchsuchen

Fix git 'dubious ownership' when dw update runs as root

The service runs as root for NeoPixel DMA, so dw update inherits root.
Git refuses to operate on a user-owned repo as root. Add safe.directory
before git pull to allow it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tuanchris vor 4 Monaten
Ursprung
Commit
c6e9b6daff
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      dw

+ 1 - 0
dw

@@ -106,6 +106,7 @@ cmd_update() {
     # Check if we should skip the pull phase (called after re-exec)
     if [[ "$1" != "--continue" ]]; then
         echo "Pulling latest code..."
+        git config --global --add safe.directory "$INSTALL_DIR" 2>/dev/null || true
         git pull
 
         # Update dw CLI