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

未关闭 适合新手
#247 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
73/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, go, shell
领域
cli

调研方向

找到执行最新版本查询并构造下载 URL 的安装程序入口;issue 没有指出文件或测试。阅读该查询逻辑,并追踪请求失败时版本是如何设置的,然后运行相关的安装程序检查。完成标准是:查询失败时会以明确的错误停止,或使用有效的发行版本,并且绝不生成版本为空的 URL。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Go
星标
3k
派生
219
平均合并
2 天 2 小时
30 天内合并 PR
66

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

google-gemini/gemini-api-cli 的其他 Issue

查看 google-gemini/gemini-api-cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。