Small fixes

pull/245/head
KnifMelti 2022-12-11 12:02:36 +01:00
parent 3c30bfec00
commit d6abb076c3
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}