Fix hash mismatch
This commit is contained in:
@@ -147,7 +147,7 @@ function DownloadFiles {
|
||||
Write-Host "File not found, downloading..."
|
||||
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
|
||||
}
|
||||
if ((Get-FileHash -Path $filePath -Algorithm SHA1).Hash -ne $fileInfo.Hash) {
|
||||
if ($fileInfo.Hash -and (Get-FileHash -Path $filePath -Algorithm SHA1).Hash -ne $fileInfo.Hash) {
|
||||
Write-Host "File hash mismatch, redownloading..."
|
||||
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user