Skip to content

Commit 5b139c8

Browse files
committed
Fix deploy failure in compression sweep under set -euo pipefail
The [ -ge ] && rm shortcut returned 1 on the last loop iteration when the compressed sibling was smaller than the source (the normal case), which propagates through the find | while pipe under pipefail and kills the script. Use a plain if / fi block so the body always exits cleanly.
1 parent 0d667fe commit 5b139c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ find "${RELEASE_DIR}" -type f \( -name '*.br' -o -name '*.gz' \) -print0 \
7777
[ -f "${_o}" ] || continue
7878
_cs=$(stat -c%s "${_c}" 2>/dev/null || echo 0)
7979
_os=$(stat -c%s "${_o}" 2>/dev/null || echo 1)
80-
[ "${_cs}" -ge "${_os}" ] && rm -f "${_c}"
80+
if [ "${_cs}" -ge "${_os}" ]; then rm -f "${_c}"; fi
8181
done
8282

8383
log "Atomic swap..."

0 commit comments

Comments
 (0)