ci: Use eval to make retry() work for pipelines too

master
LemonBoy 2020-12-04 17:31:27 +01:00
parent 2282eb1be1
commit 55838bc291
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ CMD_WAIT_TIME=10s
# We give up after retrying CMD_MAX_RETRY times.
retry() {
for i in $(seq 1 "$CMD_MAX_RETRY"); do
"$@" && return
eval "$@" && return
echo "command \"$@\" failed, retrying..."
sleep ${CMD_WAIT_TIME}
done