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 #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 "------" # Find the line that starts with "------"
$fl = 0 $fl = 0
@ -52,7 +52,7 @@ function Get-WingetOutdatedApps {
} }
#Get header line #Get header line
$fl = $fl - 2 $fl = $fl - 1
#Get header titles #Get header titles
$index = $lines[$fl] -split '\s+' $index = $lines[$fl] -split '\s+'