diff --git a/setupTmp.ps1 b/setupTmp.ps1 index 1533825..7ff0043 100644 --- a/setupTmp.ps1 +++ b/setupTmp.ps1 @@ -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 }