Logical optimization
parent
221953687e
commit
331c1f160e
|
@ -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
|
||||
|
@ -52,7 +52,7 @@ function Get-WingetOutdatedApps {
|
|||
}
|
||||
|
||||
#Get header line
|
||||
$fl = $fl - 2
|
||||
$fl = $fl - 1
|
||||
|
||||
#Get header titles
|
||||
$index = $lines[$fl] -split '\s+'
|
||||
|
|
Loading…
Reference in New Issue