diff --git a/.azure-pipelines/templates/stages/deploy-stage.yml b/.azure-pipelines/templates/stages/deploy-stage.yml index 337a853d5..6c654448a 100644 --- a/.azure-pipelines/templates/stages/deploy-stage.yml +++ b/.azure-pipelines/templates/stages/deploy-stage.yml @@ -61,8 +61,7 @@ stages: local count=1 while [[ "${count}" -le 3 ]]; do # run the command in a way that doesn't disable setting `errexit` - "${@}" - result="${?}" + "${@}" || result="${?}" if [[ $result -eq 0 ]]; then break; fi count="$((count + 1))" sleep 1