From 05e486ae4f53d1615cfe821f11b171ad58e2de27 Mon Sep 17 00:00:00 2001 From: uprightbass360 Date: Sat, 15 Nov 2025 17:58:05 -0500 Subject: [PATCH] fix(deploy): Handle rsync exit code 23 (permission warnings) gracefully rsync returns exit code 23 for permission warnings which are harmless in WSL2. With 'set -e', these warnings caused deployment to abort before containers started. Fix: Catch exit code 23 and continue deployment, only fail on other errors. --- scripts/bash/stage-modules.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -)