Просмотр исходного кода

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 месяцев назад
Родитель
Сommit
c6e9b6daff
1 измененных файлов с 1 добавлено и 0 удалено
  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