mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-02-03 02:43:50 +00:00
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.
This commit is contained in:
@@ -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 -)
|
||||
|
||||
Reference in New Issue
Block a user