Skip to content

Commit 815b0a1

Browse files
committed
Make gpg write log output to stdout in PowerShell
gpg by default writes to stderr which is treated as "an error occurred" by PowerShell. Hence write log output to stdout (FD 1) too.
1 parent 69fc160 commit 815b0a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/codecov.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ if (Get-Command "gpg.exe" -ErrorAction SilentlyContinue){
1717
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig
1818

1919
$ErrorActionPreference = "Continue"
20-
gpg.exe --import codecov.asc
20+
gpg.exe --logger-fd 1 --import codecov.asc
2121
if ($LASTEXITCODE -ne 0) { Throw "Importing the key failed." }
22-
gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
22+
gpg.exe --logger-fd 1 --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
2323
if ($LASTEXITCODE -ne 0) { Throw "Signature validation of the SHASUM failed." }
2424
If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) {
2525
echo "SHASUM verified"

0 commit comments

Comments
 (0)