From ac47b9d78bd30469424d1e2476f1b30222065269 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Wed, 1 Nov 2023 19:28:25 +0100 Subject: [PATCH] Now returns success, fail or current from Update-WinGet --- Winget-AutoUpdate/functions/Update-WinGet.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Winget-AutoUpdate/functions/Update-WinGet.ps1 b/Winget-AutoUpdate/functions/Update-WinGet.ps1 index 9b32a6b..8aea0fe 100644 --- a/Winget-AutoUpdate/functions/Update-WinGet.ps1 +++ b/Winget-AutoUpdate/functions/Update-WinGet.ps1 @@ -69,11 +69,13 @@ Function Update-WinGet { $WingetCmd = $WingetInfo[-1].FileName & $WingetCmd source reset --force Write-ToLog "-> WinGet sources reset.`n" "green" + return "success" } catch { Write-ToLog "-> Failed to install WinGet MSIXBundle for App Installer...`n" "red" Update-StoreApps + return "fail" } #Remove WinGet MSIXBundle @@ -81,5 +83,6 @@ Function Update-WinGet { } else { Write-ToLog "-> WinGet is up to date: v$WinGetInstalledVersion`n" "Green" + return "current" } }