Skip to content

Commit 2fea4eb

Browse files
[Windows] Verify hash sum for cobertura (#8447)
1 parent 5669edd commit 2fea4eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

images/win/scripts/Installers/Install-JavaTools.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,12 @@ setx MAVEN_OPTS $maven_opts /M
133133

134134
# Download cobertura jars
135135
$uri = 'https://repo1.maven.org/maven2/net/sourceforge/cobertura/cobertura/2.1.1/cobertura-2.1.1-bin.zip'
136+
$sha256sum = '79479DDE416B082F38ECD1F2F7C6DEBD4D0C2249AF80FD046D1CE05D628F2EC6'
136137
$coberturaPath = "C:\cobertura-2.1.1"
137138

138139
$archivePath = Start-DownloadWithRetry -Url $uri -Name "cobertura.zip"
140+
$fileHash = (Get-FileHash -Path $archivePath -Algorithm SHA256).Hash
141+
Use-ChecksumComparison $fileHash $sha256sum
139142
Extract-7Zip -Path $archivePath -DestinationPath "C:\"
140143

141144
setx COBERTURA_HOME $coberturaPath /M

0 commit comments

Comments
 (0)