Now returns success, fail or current from Update-WinGet

pull/463/head
KnifMelti 2023-11-01 19:28:25 +01:00
parent 0c8f3f1a89
commit ac47b9d78b
1 changed files with 3 additions and 0 deletions

View File

@ -69,11 +69,13 @@ Function Update-WinGet {
$WingetCmd = $WingetInfo[-1].FileName $WingetCmd = $WingetInfo[-1].FileName
& $WingetCmd source reset --force & $WingetCmd source reset --force
Write-ToLog "-> WinGet sources reset.`n" "green" Write-ToLog "-> WinGet sources reset.`n" "green"
return "success"
} }
catch { catch {
Write-ToLog "-> Failed to install WinGet MSIXBundle for App Installer...`n" "red" Write-ToLog "-> Failed to install WinGet MSIXBundle for App Installer...`n" "red"
Update-StoreApps Update-StoreApps
return "fail"
} }
#Remove WinGet MSIXBundle #Remove WinGet MSIXBundle
@ -81,5 +83,6 @@ Function Update-WinGet {
} }
else { else {
Write-ToLog "-> WinGet is up to date: v$WinGetInstalledVersion`n" "Green" Write-ToLog "-> WinGet is up to date: v$WinGetInstalledVersion`n" "Green"
return "current"
} }
} }