@@ -238,22 +238,18 @@ jobs:
238238 }
239239 Write-Host "Composite action installed: $installedVersion"
240240
241- $binaryPath = Join-Path $HOME ".local/share/gh/extensions/gh-aw/gh-aw.exe"
242- if (-not (Test-Path $binaryPath)) {
243- throw "Binary not found at $binaryPath"
241+ # Verify via gh aw commands rather than a hardcoded binary path.
242+ # `gh extension install` registers the extension under gh's own data dir
243+ # (e.g. %APPDATA%\GitHub CLI\extensions on Windows), so using `gh aw`
244+ # is the correct cross-platform verification mechanism.
245+ gh aw version 2>&1 | Write-Host
246+ if ($LASTEXITCODE -ne 0) {
247+ throw "'gh aw version' failed with exit code $LASTEXITCODE"
244248 }
245- Write-Host "Binary found at: $binaryPath"
246249
247- & $binaryPath version 2>&1 | Write-Host
248- $versionExit = $LASTEXITCODE
249- if ($versionExit -ne 0) {
250- throw "Binary 'version' command failed with exit code $versionExit"
251- }
252-
253- & $binaryPath --help 2>&1 | Write-Host
254- $helpExit = $LASTEXITCODE
255- if ($helpExit -ne 0) {
256- throw "Binary '--help' command failed with exit code $helpExit"
250+ gh aw --help 2>&1 | Write-Host
251+ if ($LASTEXITCODE -ne 0) {
252+ throw "'gh aw --help' failed with exit code $LASTEXITCODE"
257253 }
258254
259255 - name : Upload PowerShell test results
0 commit comments