diff --git a/scripts/bash/stage-modules.sh b/scripts/bash/stage-modules.sh index d19e61b..2ab1d92 100755 --- a/scripts/bash/stage-modules.sh +++ b/scripts/bash/stage-modules.sh @@ -54,7 +54,16 @@ sync_local_staging(){ fi if command -v rsync >/dev/null 2>&1; then - rsync -a --delete "$src_modules"/ "$dest_modules"/ + # rsync may return exit code 23 (permission warnings) in WSL2 - these are harmless + rsync -a --delete "$src_modules"/ "$dest_modules"/ || { + local rsync_exit=$? + if [ $rsync_exit -eq 23 ]; then + echo "ℹ️ rsync completed with permission warnings (normal in WSL2)" + else + echo "⚠️ rsync failed with exit code $rsync_exit" + return $rsync_exit + fi + } else find "$dest_modules" -mindepth 1 -maxdepth 1 -exec rm -rf {} + 2>/dev/null || true (cd "$src_modules" && tar cf - .) | (cd "$dest_modules" && tar xf -)