Skip to content

Commit e648822

Browse files
Copilotgh-aw-bot
andauthored
fix: use gh aw commands in Windows CI instead of hardcoded binary path
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
1 parent 221be01 commit e648822

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/install.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)