Fix retry-docker-build exit code capture after failed build.
CI / test (push) Waiting to run

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-10 14:02:08 +03:00
parent ff285ef867
commit c15590983e
+5 -2
View File
@@ -16,10 +16,13 @@ fi
attempt=1
while true; do
echo "== docker build attempt ${attempt}/${MAX}: $*"
if "$@"; then
set +e
"$@"
code=$?
set -e
if (( code == 0 )); then
exit 0
fi
code=$?
if (( attempt >= MAX )); then
echo "== all ${MAX} attempts failed (last exit ${code})"
exit "${code}"