avoid redownload if the previous update fails
未关闭
还没有人认领这个 Issue。
triage
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
Describe the feature or problem you'd like to solve
when copilot is requested to update itself, it downloads a package and then installs it. if the installation fails for whatever reason, the next update request downloads the package once again without trying to reuse the previously downloaded update
Proposed solution
Here is a shell snippet indicating the fact that Copilot tries to redownload the update package when the previous attempt to update failed
Caching binaries in the local filesystem can avoid this and isn't a bad idea until the next update arrives
~/git-repos$ copilot update
Checking for updates...
Checking GitHub for the latest release...
Update available: v1.0.84-3 (current: 1.0.84-1).
Downloading update package...
Download complete. Installing...
Error during update: Failed to download package: Error: EPERM: operation not permitted, rename 'C:\Users\myself\.copilot\pkg\tmp\1.0.84-3-13492-1789030021787' -> 'C:\Users\myself\.copilot\pkg\win32-x64\1.0.84-3'
~/git-repos$ copilot update
Checking for updates...
Checking GitHub for the latest release...
Update available: v1.0.84-3 (current: 1.0.84-1).
Downloading update package...
Download complete. Installing...
Copilot CLI version 1.0.84-3 installed.
### Example prompts or workflows
_No response_
### Additional context
_No response_
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 copilot update 入口开始,跟踪报告中显示的下载和安装流程,包括本地软件包路径。复现一次安装失败,随后再次发起更新请求。当之前下载的软件包在仍然是所请求的更新时被重新使用,而不是再次下载时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- cli, release
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100