avoid redownload if the previous update fails
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
copilot update のエントリーポイントから開始し、レポートに示されているダウンロードおよびインストールのシーケンスを、ローカルパッケージパスを含めて追跡します。インストールが失敗した後に、別の更新リクエストを行うケースを再現します。要求された更新に対して引き続き有効である場合に、以前ダウンロードしたパッケージが再度ダウンロードされずに再利用されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli, release
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100