Sync eng/common directory with azure-sdk-tools for PR 13045 (#6841)
* Enforce an array for single element * Enforced an array for where filter --------- Co-authored-by: ray chen <raychen@microsoft.com>
This commit is contained in:
parent
102c9be4c6
commit
e54ff91062
@ -374,7 +374,7 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) {
|
||||
# Lowest Priority: Direct PackageInfoFiles (new method)
|
||||
Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files"
|
||||
# Filter out empty strings or whitespace-only entries
|
||||
$ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
|
||||
$ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
|
||||
}
|
||||
else {
|
||||
Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters."
|
||||
|
||||
@ -278,12 +278,11 @@ if ($ArtifactList -and $ArtifactList.Count -gt 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0)
|
||||
{
|
||||
elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) {
|
||||
# Direct PackageInfoFiles (new method)
|
||||
Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files"
|
||||
# Filter out empty strings or whitespace-only entries
|
||||
$ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
|
||||
$ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
|
||||
}
|
||||
|
||||
# Validate that we have package info files to process
|
||||
|
||||
Loading…
Reference in New Issue
Block a user