From 3f0fe8eec238ad5e3e6ef1fe1bd3b87bfa67e482 Mon Sep 17 00:00:00 2001 From: William Wong Date: Wed, 6 Dec 2023 06:13:10 -0800 Subject: [PATCH] Simplify --- .github/workflows/pull-request-validation.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-request-validation.yml b/.github/workflows/pull-request-validation.yml index 3e13581f10..ddf78615b0 100644 --- a/.github/workflows/pull-request-validation.yml +++ b/.github/workflows/pull-request-validation.yml @@ -197,15 +197,8 @@ jobs: do curl http://localhost:4444/wd/hub/status > /tmp/wd-status.json - if [[ $? -eq 0 ]] - then - cat /tmp/wd-status.json | jq -r 'if (.value.ready != true) then halt_error(1) else empty end' - - if [[ $? -eq 0 ]] - then - break - fi - fi + [[ $? -eq 0 ]] && cat /tmp/wd-status.json | jq -r 'if (.value.ready != true) then halt_error(1) else empty end' + [[ $? -eq 0 ]] && break sleep 1 done