From 8adc888a6c734c7a785be06fe2341aa729d13a7b Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Fri, 25 Sep 2020 13:43:42 -0700 Subject: [PATCH] reset result before running command because bash short circuits or conditionals --- .azure-pipelines/templates/stages/deploy-stage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/stages/deploy-stage.yml b/.azure-pipelines/templates/stages/deploy-stage.yml index 6c654448a..ee1eaff1d 100644 --- a/.azure-pipelines/templates/stages/deploy-stage.yml +++ b/.azure-pipelines/templates/stages/deploy-stage.yml @@ -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))"