From d6abb076c3f9781559de42fb12feb07a8da8f63f Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Sun, 11 Dec 2022 12:02:36 +0100 Subject: [PATCH] Small fixes --- Winget-AutoUpdate/Winget-Upgrade.ps1 | 2 +- Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 | 2 +- Winget-AutoUpdate/functions/Update-App.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Winget-AutoUpdate/Winget-Upgrade.ps1 index 116de25..0be7404 100644 --- a/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -126,7 +126,7 @@ if (Test-Network) { $outdated = Get-WingetOutdatedApps #If something is wrong with the winget source, exit - if (($outdated -like "Problem:*")) { + if ($outdated -like "Problem:*") { Write-Log "An error occured, exiting..." "red" Write-Log "$outdated" "red" Exit 1 diff --git a/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 b/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 index b32e45c..ae6aa50 100644 --- a/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 +++ b/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 @@ -13,7 +13,7 @@ function Get-WingetOutdatedApps { #Start Convertion of winget format to an array. Check if "-----" exists (Winget Error Handling) if (!($upgradeResult -match "-----")) { - return "Problem:$upgradeResult" + return "Problem:`n$upgradeResult" } #Split winget output to lines diff --git a/Winget-AutoUpdate/functions/Update-App.ps1 b/Winget-AutoUpdate/functions/Update-App.ps1 index 6c5ea56..11096a4 100644 --- a/Winget-AutoUpdate/functions/Update-App.ps1 +++ b/Winget-AutoUpdate/functions/Update-App.ps1 @@ -53,7 +53,7 @@ Function Update-App ($app) { #Test for a Pending Reboot (Component Based Servicing/WindowsUpdate/CCM_ClientUtilities) $PendingReboot = Test-PendingReboot if ($PendingReboot -eq $true) { - Write-Log "-> A Pending Reboot lingers and probably prohibited $($app.Name) from upgrading...`n...an install for $($app.Name) is NOT executed!" "Red" + Write-Log "-> A Pending Reboot lingers and probably prohibited $($app.Name) from upgrading...`n-> ...an install for $($app.Name) is NOT executed!" "Red" $FailedToUpgrade = $true break }