From 34d1e146678775de8e1e25ee5858ad231c88a93f Mon Sep 17 00:00:00 2001 From: Gustavo Trott Date: Thu, 24 Oct 2024 16:45:08 -0300 Subject: [PATCH 1/2] Avoid exit on error running --- build/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/setup.sh b/build/setup.sh index 24787fe913..10b9fc1de3 100755 --- a/build/setup.sh +++ b/build/setup.sh @@ -57,7 +57,7 @@ max_retries=5 retry_wait=300 # wait time in seconds (5 minutes) while [[ $retry_count -lt $max_retries ]]; do - if sudo docker pull "$DOCKER_IMAGE"; then + if sudo docker pull "$DOCKER_IMAGE" || false; then echo "Docker image pulled successfully." break else From 4bfc5a3592bdcbf39118dd2c90c9d942bf7c324d Mon Sep 17 00:00:00 2001 From: Gustavo Trott Date: Thu, 24 Oct 2024 16:51:11 -0300 Subject: [PATCH 2/2] fix retry increment --- build/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/setup.sh b/build/setup.sh index 10b9fc1de3..091572556e 100755 --- a/build/setup.sh +++ b/build/setup.sh @@ -62,7 +62,7 @@ while [[ $retry_count -lt $max_retries ]]; do break else echo "Failed to pull Docker image, attempt $((retry_count+1))/$max_retries." - ((retry_count++)) + retry_count=$((retry_count+1)) if [[ $retry_count -lt $max_retries ]]; then echo "Waiting for $retry_wait seconds before retrying..." sleep $retry_wait