Small fixes
parent
3c30bfec00
commit
d6abb076c3
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue