Fix expected same ordering

It is not guaranteened that integration list will bethe in the same order after updating
This commit is contained in:
Wroclaw 2022-07-04 01:48:17 +02:00
parent 62b17769e9
commit 4e3e1cc6d6

View file

@ -189,9 +189,10 @@ function main {
[System.Collections.ArrayList]$savedExclusions = New-Object System.Collections.ArrayList
$savedExclusionsNames = $config.excluded
foreach ($i in $integrationsList) {
if (($null -ne $savedExclusionsNames[0]) -and $i.StartsWith($savedExclusionsNames[0])) {
[void] $savedExclusions.Add($true)
$savedExclusionsNames.RemoveAt(0)
$integrationID = $i.Split(':')[0]
if (($savedExclusionsNames.Count -gt 1) -and $savedExclusionsNames.Contains($integrationID)) {
$savedExclusions.Add($true)
$savedExclusionsNames.Remove($integrationID)
}
else {
[void] $savedExclusions.Add($false)