From e1f679c300bec1b31ba446fb86664a9ca98a07ef Mon Sep 17 00:00:00 2001 From: Mark Yen Date: Wed, 8 May 2024 14:02:14 -0700 Subject: [PATCH] CI: Fix retrying `wsl --update` The previous try/catch didn't seem to actually work; fix it to use exit status instead. Signed-off-by: Mark Yen --- .github/actions/setup-environment/action.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-environment/action.yaml b/.github/actions/setup-environment/action.yaml index 484fd3304d1..23c0ce4b3e2 100644 --- a/.github/actions/setup-environment/action.yaml +++ b/.github/actions/setup-environment/action.yaml @@ -21,13 +21,8 @@ runs: # Sometimes this results in a HTTP 403 for some reason; in that case, we # need to retry. do { - try { - wsl --update - break - } catch [Exception] { - Write-Host $_.Exception.Message - } - } while ($true) + wsl --update + } while ( -not $? ) - name: "Windows: Finish setting up WSL" if: runner.os == 'Windows'