Add message letting the user known WinUtil is not found to Get-LatestWinUtil

This commit is contained in:
Cryostrixx 2024-09-23 14:10:22 -07:00
parent 73aa021957
commit e29ce43147
No known key found for this signature in database
GPG Key ID: 2FC11420AFB82801

View File

@ -82,6 +82,7 @@ $WinUtilScriptPath = Join-Path "$env:TEMP" "winutil.ps1"
# Function to download the latest release of WinUtil from the releases page to the local disk.
function Get-LatestWinUtil {
if (!(Test-Path $WinUtilScriptPath)) {
Write-Host "WinUtil is not found. Downloading WinUtil '$($WinUtilReleaseTag)'..." -ForegroundColor DarkYellow
Invoke-RestMethod $WinUtilReleaseURL -OutFile $WinUtilScriptPath
}
}