diff --git a/Jenkinsfile b/Jenkinsfile index 3268c36..55d80a3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -194,11 +194,10 @@ PY delay=8 attempt=1 while [ "${attempt}" -le "${attempts}" ]; do - "$@" - rc=$? - if [ "${rc}" -eq 0 ]; then + if "$@"; then return 0 fi + rc=$? if [ "${attempt}" -eq "${attempts}" ]; then return "${rc}" fi