github / github/copilot-cli

avoid redownload if the previous update fails

Đang mở
#4,799 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

triage
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu tại điểm vào copilot update và lần theo chuỗi tải xuống và cài đặt được nêu trong báo cáo, bao gồm cả các đường dẫn gói cục bộ. Tái hiện một lần cài đặt thất bại, sau đó thực hiện một yêu cầu cập nhật khác. Được xem là hoàn tất khi một gói đã tải xuống trước đó được sử dụng lại thay vì được tải xuống lần nữa, nếu gói đó vẫn là gói được yêu cầu cho bản cập nhật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
shell
Lĩnh vực
cli, release
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.