Skip to content

Commit

Permalink
Try try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilKWarmdahl committed Nov 19, 2024
1 parent dbb5e05 commit 78d5f1f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,18 @@ 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 }}"
exit 1
}
elseif ( $ec -ne "1" ){
echo "$output"
}
}}
- name: Build
run: |
Expand Down

0 comments on commit 78d5f1f

Please sign in to comment.