Skip to content

Commit c6a202b

Browse files
gjulianmmwdd146980
authored andcommitted
ci: fix unbound variable in retry.sh (#44464)
### What does this PR do? Fixes an unbound bash variable in the retry.sh script. ### Motivation Fix the script ### Describe how you validated your changes Ran the script locally wihtout the env var defined to ensure it works. ### Additional Notes Co-authored-by: guillermo.julian <guillermo.julian@datadoghq.com>
1 parent 7a07d8a commit c6a202b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/ci/retry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fi
1818
for i in $(seq 1 $((NB_ATTEMPTS - 1))); do
1919
"$@" && exit 0
2020
exitCode=$?
21-
if [ ! -z "$NO_RETRY_EXIT_CODE" ] && [ "$exitCode" = "$NO_RETRY_EXIT_CODE" ]; then
21+
if [ -n "${NO_RETRY_EXIT_CODE-}" ] && [ "$exitCode" = "$NO_RETRY_EXIT_CODE" ]; then
2222
>&2 echo "Attempt #$i/$NB_ATTEMPTS failed with error code $exitCode, but not retrying since NO_RETRY_EXIT_CODE is set to $NO_RETRY_EXIT_CODE"
2323
exit $exitCode
2424
fi

0 commit comments

Comments
 (0)