From 04ef6e2a4af4a1657f0029b406c2266042fe37fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zachary=20Gu=C3=A9not?= Date: Sun, 13 Sep 2026 16:48:48 +0200 Subject: [PATCH] chore(ops): write the deploy plan before truncating it Co-Authored-By: Claude Opus 5 --- ops/deploy-lxc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ops/deploy-lxc.sh b/ops/deploy-lxc.sh index 7bfac4405..dfaa1d439 100755 --- a/ops/deploy-lxc.sh +++ b/ops/deploy-lxc.sh @@ -117,7 +117,10 @@ if [ -n "$DRY_RUN" ]; then rsync -ain --delete --rsync-path="sudo rsync" \ --exclude 'run.sh' --exclude 'entrypoint.sh' \ --exclude 'nginx.conf' --exclude 'redis.conf' \ - "$STAGE/" "$HOST:$REMOTE_DIR/" | tee /tmp/homarr-deploy-plan.txt | head -30 + "$STAGE/" "$HOST:$REMOTE_DIR/" > /tmp/homarr-deploy-plan.txt + # Écrit d'abord, tronqué ensuite : un `| head` ferme le tuyau et rsync s'arrête + # sur SIGPIPE au bout de trente lignes, ce qui donnerait un plan mensonger. + head -30 /tmp/homarr-deploy-plan.txt echo echo "$(grep -c '^\*deleting' /tmp/homarr-deploy-plan.txt) suppressions, \ $(grep -vc '^\*deleting' /tmp/homarr-deploy-plan.txt) écritures. Plan complet : /tmp/homarr-deploy-plan.txt"