Logical optimization

pull/46/head
Romain 2022-04-08 00:50:28 +02:00
parent 221953687e
commit 331c1f160e
1 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ function Get-WingetOutdatedApps {
}
#Split winget output to lines
$lines = $upgradeResult.Split([Environment]::NewLine).Replace("¦ ","")
$lines = $upgradeResult.Split([Environment]::NewLine).Replace("¦ ","") | Where-Object {$_}
# Find the line that starts with "------"
$fl = 0
@ -51,8 +51,8 @@ function Get-WingetOutdatedApps {
$fl++
}
#Get header line
$fl = $fl - 2
#Get header line
$fl = $fl - 1
#Get header titles
$index = $lines[$fl] -split '\s+'