8000 Throw an exception if the downloaded setup is empty · cygwin/cygwin-install-action@2fea0d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fea0d7

Browse files
mlocatijon-turney
authored andcommitted
Throw an exception if the downloaded setup is empty
1 parent a39f501 commit 2fea0d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ runs:
5353
}
5454
$setupFileName = "setup-$platform.exe"
5555
Invoke-WebRequest "https://cygwin.com/$setupFileName" -OutFile C:\setup.exe
56+
if ((Get-Item -LiteralPath 'C:\setup.exe').Length -eq 0) {
57+
throw "The downloaded setup has a zero length!"
58+
}
5659
5760
if ('${{ inputs.check-hash }}' -eq 'true') {
5861
$expectedHashLines = $(Invoke-WebRequest -Uri https://cygwin.com/sha512.sum).ToString() -split "`n"

0 commit comments

Comments
 (0)
0