From 5ba30d8c865e80b4990f92ad8269e3bdef49aa8a Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 31 Jan 2022 22:05:22 +0100 Subject: [PATCH] minor changes added check for "|" removal character on long name app causing error --- winget-update/winget-upgrade.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winget-update/winget-upgrade.ps1 b/winget-update/winget-upgrade.ps1 index 6b3f7e1..211aef1 100644 --- a/winget-update/winget-upgrade.ps1 +++ b/winget-update/winget-upgrade.ps1 @@ -183,7 +183,7 @@ function Get-WingetOutdated { # Now cycle in real package and split accordingly $upgradeList = @() 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('-')){ $software = [Software]::new() $software.Name = $line.Substring(0, $idStart).TrimEnd() @@ -301,4 +301,4 @@ if (Test-Network){ #End Write-Log "End of process!" "Cyan" -Sleep 3 +Sleep 3 \ No newline at end of file