From f677b149a5abe90e76842e3788621a366898137c Mon Sep 17 00:00:00 2001 From: Praven Kuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:59:52 -0400 Subject: [PATCH] Ensure artifact filter function gets array result from get-childitem (#39276) --- eng/scripts/Language-Settings.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 43b53c526ca63..50fe7d1a90bf3 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -655,7 +655,7 @@ function Find-java-Artifacts-For-Apireview($artifactDir, $pkgName) # Filter for package in "com.azure*" groupid. $artifactPath = Join-Path $artifactDir "com.azure*" $pkgName Write-Host "Checking for source jar in artifact path $($artifactPath)" - $files = Get-ChildItem -Recurse "${artifactPath}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")} + $files = @(Get-ChildItem -Recurse "${artifactPath}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")}) if (!$files) { Write-Host "$($artifactPath) does not have any package"