minor changes

added check for "|" removal character on long name app causing error
pull/2/head
Romain 2022-01-31 22:05:22 +01:00 committed by GitHub
parent 81a8202402
commit 5ba30d8c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ function Get-WingetOutdated {
# Now cycle in real package and split accordingly # Now cycle in real package and split accordingly
$upgradeList = @() $upgradeList = @()
For ($i = $fl + 2; $i -le $lines.Length; $i++){ For ($i = $fl + 2; $i -le $lines.Length; $i++){
$line = $lines[$i] $line = $lines[$i].Replace("¦ ","")
if ($line.Length -gt ($sourceStart+5) -and -not $line.StartsWith('-')){ if ($line.Length -gt ($sourceStart+5) -and -not $line.StartsWith('-')){
$software = [Software]::new() $software = [Software]::new()
$software.Name = $line.Substring(0, $idStart).TrimEnd() $software.Name = $line.Substring(0, $idStart).TrimEnd()
@ -301,4 +301,4 @@ if (Test-Network){
#End #End
Write-Log "End of process!" "Cyan" Write-Log "End of process!" "Cyan"
Sleep 3 Sleep 3