Less log entries

pull/412/head
KnifMelti 2023-10-09 04:58:53 +02:00
parent 0254580b23
commit 4520213363
1 changed files with 7 additions and 3 deletions

View File

@ -26,9 +26,13 @@ function Invoke-PostUpdateActions {
} }
#Check installed WinGet version #Check installed WinGet version
Get-WingetCmd $ResolveWingetPath = Resolve-Path "$env:programfiles\WindowsApps\Microsoft.DesktopAppInstaller_*_*__8wekyb3d8bbwe\winget.exe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') }
$InstalledWinGetVersion = & $Winget --version if ($ResolveWingetPath) {
$InstalledWinGetVersion = $InstalledWinGetVersion.Replace("v", "") #If multiple version, pick last one
$WingetPath = $ResolveWingetPath[-1].Path
$InstalledWinGetVersion = & $WingetPath --version
$InstalledWinGetVersion = $InstalledWinGetVersion.Replace("v", "")
}
#Check if the current available WinGet isn't a Pre-release and if it's newer than the installed #Check if the current available WinGet isn't a Pre-release and if it's newer than the installed
if (!($AvailableWinGetVersion -match "-pre") -and ($AvailableWinGetVersion -gt $InstalledWinGetVersion)) { if (!($AvailableWinGetVersion -match "-pre") -and ($AvailableWinGetVersion -gt $InstalledWinGetVersion)) {