Skip to content

Commit

Permalink
Merge pull request #49 from Romanitho/remove-blank-lines
Browse files Browse the repository at this point in the history
remove blank lines
  • Loading branch information
Romanitho authored Aug 17, 2024
2 parents 43b32a6 + e61af9a commit 6c41699
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ function Get-WingetOutdatedApps {
}

#Get list of available upgrades on winget format
$upgradeResult = & $Winget upgrade --source winget | Out-String
$upgradeResult = & $Winget upgrade --source winget | Where-Object { $_ -notlike " *" } | Out-String

#Start Convertion of winget format to an array. Check if "-----" exists (Winget Error Handling)
if (!($upgradeResult -match "-----")) {
return "An unusual thing happened (maybe all apps are upgraded):`n$upgradeResult"
return "No update found. Winget upgrade output:`n$upgradeResult"
}

#Split winget output to lines
Expand Down

0 comments on commit 6c41699

Please sign in to comment.