Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,10 +16,13 @@ fi
|
|||||||
attempt=1
|
attempt=1
|
||||||
while true; do
|
while true; do
|
||||||
echo "== docker build attempt ${attempt}/${MAX}: $*"
|
echo "== docker build attempt ${attempt}/${MAX}: $*"
|
||||||
if "$@"; then
|
set +e
|
||||||
|
"$@"
|
||||||
|
code=$?
|
||||||
|
set -e
|
||||||
|
if (( code == 0 )); then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
code=$?
|
|
||||||
if (( attempt >= MAX )); then
|
if (( attempt >= MAX )); then
|
||||||
echo "== all ${MAX} attempts failed (last exit ${code})"
|
echo "== all ${MAX} attempts failed (last exit ${code})"
|
||||||
exit "${code}"
|
exit "${code}"
|
||||||
|
|||||||
Reference in New Issue
Block a user