Skip to content

Commit 8b3417c

Browse files
committed
revert to bash, ensure correct extraction path
1 parent 7732682 commit 8b3417c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.azure-pipelines/generation-templates/build-and-publish-kiota.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ steps:
1616
} else {
1717
tar -xzf $downloadPath -C $extractPath
1818
}
19-
$kiotaBin = Get-ChildItem -Path $extractPath -Filter "kiota" -Recurse -File | Select-Object -First 1
19+
# Match 'kiota' or 'kiota.exe' via BaseName
20+
$kiotaBin = Get-ChildItem -Path $extractPath -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1
2021
Write-Host "Found Kiota binary at: $($kiotaBin.FullName)"
2122
$stagingDir = "$(Build.ArtifactStagingDirectory)"
2223
New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null
24+
# Always copy as 'kiota' (no extension) so downstream steps are platform-agnostic
2325
Copy-Item -Path $kiotaBin.FullName -Destination (Join-Path $stagingDir "kiota")
2426
displayName: 'Download latest Kiota from GitHub'

0 commit comments

Comments
 (0)