Sfoglia il codice sorgente

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 4 mesi fa
parent
commit
c6e9b6daff
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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