Skip to content

fix(gh): correct exe-path for Windows platform#45

Merged
suin merged 1 commit into
appthrust:mainfrom
rhuanbarreto:fix/gh-windows-exe-path
Feb 28, 2026
Merged

fix(gh): correct exe-path for Windows platform#45
suin merged 1 commit into
appthrust:mainfrom
rhuanbarreto:fix/gh-windows-exe-path

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Fix the exe-path for [platform.windows] in the gh plugin from gh_{version}_windows_{arch}/bin/gh.exe to bin/gh.exe
  • The GitHub CLI Windows zip archives have never included a top-level directory prefix — the archive structure is flat (LICENSE, bin/gh.exe), unlike Linux (.tar.gz) and macOS (.zip) which do include the gh_{version}_{os}_{arch}/ prefix

Problem

Installing the gh CLI via proto on Windows fails with:

Error: proto::locate::missing_executable

  × Unable to find an executable for GitHub CLI, expected file
  │ ~/.proto/tools/gh/2.87.3/gh_2.87.3_windows_amd64/bin/gh.exe does not exist.

This happens because the plugin assumes the Windows zip has the same directory structure as Linux/macOS, but it does not. I verified multiple releases going back to v2.20.0 — the Windows zip has always been flat:

$ unzip -l gh_2.87.3_windows_amd64.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     1089  2026-02-23 16:26   LICENSE
 38849520  2026-02-23 16:31   bin/gh.exe

While Linux and macOS archives include the prefix:

$ tar tzf gh_2.87.3_linux_amd64.tar.gz | head -3
gh_2.87.3_linux_amd64/LICENSE
gh_2.87.3_linux_amd64/share/man/man1/gh-agent-task-create.1
...

Related

The GitHub CLI Windows zip archives have never included a top-level
directory prefix. The archive structure is:

  LICENSE
  bin/gh.exe

While Linux (.tar.gz) and macOS (.zip) archives include a
`gh_{version}_{os}_{arch}/` prefix directory, the Windows zip does not.

This caused proto to fail with:
  Unable to find an executable for GitHub CLI, expected file
  ~/.proto/tools/gh/{version}/gh_{version}_windows_{arch}/bin/gh.exe
  does not exist.

Fix the Windows exe-path from `gh_{version}_windows_{arch}/bin/gh.exe`
to `bin/gh.exe` to match the actual archive layout.
@suin suin merged commit 8a71797 into appthrust:main Feb 28, 2026
3 of 4 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/gh-windows-exe-path branch March 20, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants