Skip to content

Commit dfd4b1c

Browse files
petetomasiktoote
andauthored
Adjust exit status capture around set options
Co-authored-by: Matías Bellone <toote@users.noreply.github.com>
1 parent da12b9e commit dfd4b1c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

commands/run.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,8 @@ fi
348348

349349
if [[ "${BUILDKITE_PLUGIN_DOCKER_ALWAYS_PULL:-false}" =~ ^(true|on|1)$ ]] ; then
350350
echo "--- :docker: Pulling ${image}"
351-
retry "${BUILDKITE_PLUGIN_DOCKER_PULL_RETRIES:-3}" docker pull "${image}"
352-
retry_exit_status="$?"
353-
if [ $retry_exit_status -ne 0 ] ; then
351+
retry "${BUILDKITE_PLUGIN_DOCKER_PULL_RETRIES:-3}" docker pull "${image}" || retry_exit_status="$?"
352+
if [ ${retry_exit_status:-0} -ne 0 ] ; then
354353
echo "!!! :docker: Pull failed."
355354
exit "$retry_exit_status"
356355
fi

0 commit comments

Comments
 (0)