avoid redownload if the previous update fails
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
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_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the copilot update entry point and trace the download and installation sequence shown in the report, including the local package paths. Reproduce a failed installation followed by another update request. Done means a previously downloaded package is reused instead of being downloaded again when it is still the requested update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, release
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100