Simplify cURL retry check

This commit is contained in:
Alexander Grund
2025-10-27 15:12:15 +01:00
parent 5852b85aec
commit c86fcab282
2 changed files with 4 additions and 6 deletions

View File

@@ -11,10 +11,9 @@
set -eu
curl_extra_options=""
if curl --retry-all-errors 2>&1 | grep -i unknown > /dev/null ; then
if curl --retry-all-errors 2>&1 | grep -iq unknown; then
# --retry-all-errors not available
true
curl_extra_options=""
else
curl_extra_options="--retry-all-errors"
fi

View File

@@ -8,10 +8,9 @@
set -e
curl_extra_options=""
if curl --retry-all-errors 2>&1 | grep -i unknown > /dev/null ; then
if curl --retry-all-errors 2>&1 | grep -iq unknown; then
# --retry-all-errors not available
true
curl_extra_options=""
else
curl_extra_options="--retry-all-errors"
fi