reset result before running command because bash short circuits or conditionals

This commit is contained in:
Erica Portnoy 2020-09-25 13:43:42 -07:00
parent b3d79a777d
commit 8adc888a6c

View file

@ -61,6 +61,7 @@ stages:
local count=1
while [[ "${count}" -le 3 ]]; do
# run the command in a way that doesn't disable setting `errexit`
result=0
"${@}" || result="${?}"
if [[ $result -eq 0 ]]; then break; fi
count="$((count + 1))"