Installer continues with empty version after 403 and builds invalid download URL

Open Beginner friendly
#247 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github, go, shell
Domain
cli

Research direction

Find the installer entry point that performs the latest-release lookup and constructs the download URL; the issue does not name its file or a test. Read that lookup and trace how a failed request sets the version, then run the relevant installer checks. Done means a failed lookup stops with a clear error or uses a valid release, and never generates a URL with an empty version.

Written by the indexing model from the issue text.

Description

Describe the bug

The installer fails on macOS arm64 when it cannot fetch the latest release version. It then continues with an empty version and constructs an invalid download URL.

Environment

  • OS: macOS (Darwin)
  • Architecture: arm64
  • Install target: /Users/lime/.local/bin (the installer fell back because /usr/local/bin was not writable)

Logs

[INFO] Installing gemini-api CLI...
[INFO] No write access to /usr/local/bin, using /Users/lime/.local/bin instead
[INFO] Detected OS: Darwin
[INFO] Detected Architecture: arm64
[INFO] Installation directory: /Users/lime/.local/bin
curl: (56) The requested URL returned error: 403
[INFO] Latest version: 
[INFO] Downloading from: https://github.com/google-gemini/gemini-api-cli/releases/download//gemini-api_Darwin_arm64.tar.gz
curl: (56) The requested URL returned error: 404
[ERROR] Failed to download from https://github.com/google-gemini/gemini-api-cli/releases/download//gemini-api_Darwin_arm64.tar.gz

Expected behavior

If the latest-version lookup fails, the installer should stop with a clear error explaining the failed request, or retry/fall back to a valid release. It should not proceed with an empty version and a malformed download URL.

Additional context

The initial 403 appears to be from the request used to determine the latest release version. The subsequent 404 is a consequence of the empty version in the generated URL.

Dominant language
Go
Stars
3k
Forks
219
Avg merge
2d 2h
Merged PRs (30d)
66

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google-gemini/gemini-api-cli

All issues in google-gemini/gemini-api-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.