From 4f667f1b825751e7c9a5fe6b59d236c27ab1cfd1 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Thu, 20 Jun 2024 12:05:49 +0200 Subject: [PATCH] Fix hash mismatch --- setupTmp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }