From 78d5f1f6a473c9c9d95c1010a06dec3d91eaebc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 19 Nov 2024 11:11:22 +0100 Subject: [PATCH] Try try-catch --- .github/workflows/release.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9806bf2..353d1ac 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -104,8 +104,10 @@ jobs: - name: Check if version exist in s3 run: | - Set-PSDebug -Trace 1 + try { $output = aws s3 ls ${{ env.OUTFILE }} + } + catch { $ec = $LastExitCode if ( $ec -eq "0" ){ echo "Objects found ${{ env.OUTFILE }}" @@ -113,7 +115,7 @@ jobs: } elseif ( $ec -ne "1" ){ echo "$output" - } + }} - name: Build run: |