Skip to content

Commit f8dfce6

Browse files
committed
Fail properly
1 parent 01cfb1a commit f8dfce6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

windows-release/sign-files.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ steps:
3737
}
3838
if ($env:FILTER) {
3939
($env:FILTER -split ';') -join "`n" | Out-File __filelist.txt -Encoding utf8
40-
$files | %{ & $env:TRUSTED_SIGNING_CMD @(-split $env:TRUSTED_SIGNING_ARGS) -fl __filelist.txt $_ }
40+
$ec = $files | %{ & $env:TRUSTED_SIGNING_CMD @(-split $env:TRUSTED_SIGNING_ARGS) -fl __filelist.txt $_; $LASTEXITCODE }
4141
del __filelist.txt
4242
} else {
43-
$files | %{ & $env:TRUSTED_SIGNING_CMD @(-split $env:TRUSTED_SIGNING_ARGS) $_ }
43+
$ec = $files | %{ & $env:TRUSTED_SIGNING_CMD @(-split $env:TRUSTED_SIGNING_ARGS) $_; $LASTEXITCODE }
4444
}
45+
# Ensure we correctly fail the task if any signature failed
46+
$ec | ?{ $_ -ne 0 } | %{ exit $_ }
4547
displayName: 'Sign binaries'
4648
retryCountOnTaskFailure: 3
4749
workingDirectory: ${{ parameters.WorkingDir }}

0 commit comments

Comments
 (0)