Skip to content

Commit e262b44

Browse files
azure-sdkraych1
andauthored
Sync eng/common directory with azure-sdk-tools for PR 13045 (#2285)
* Enforce an array for single element * Enforced an array for where filter --------- Co-authored-by: ray chen <[email protected]>
1 parent e730bf0 commit e262b44

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

eng/common/scripts/Create-APIReview.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) {
374374
# Lowest Priority: Direct PackageInfoFiles (new method)
375375
Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files"
376376
# Filter out empty strings or whitespace-only entries
377-
$ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
377+
$ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
378378
}
379379
else {
380380
Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters."

eng/common/scripts/Validate-All-Packages.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,11 @@ if ($ArtifactList -and $ArtifactList.Count -gt 0)
278278
}
279279
}
280280
}
281-
elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0)
282-
{
281+
elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) {
283282
# Direct PackageInfoFiles (new method)
284283
Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files"
285284
# Filter out empty strings or whitespace-only entries
286-
$ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
285+
$ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
287286
}
288287

289288
# Validate that we have package info files to process

0 commit comments

Comments
 (0)