Windows: plugin install/update fails with "Access is denied. (os error 5)" while VS Code is running
Chưa có ai nhận issue này.
- 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ả
On Windows, copilot plugin install / plugin update fails whenever VS Code is running. Closing VS Code makes the same command succeed. It affects every plugin, not one specific plugin.
Repro
With VS Code open:
> copilot plugin update superpowers@superpowers-marketplace
Failed to update plugin: Error: Request plugins.update failed with message: Failed to install plugin: Access is denied. (os error 5)
Close VS Code, run the same command again -> succeeds.
Cause: open directory handles on the plugin store
On Windows a directory that has an open handle cannot be renamed or deleted. Probing which paths can be renamed:
rename DENIED: ~/.copilot/installed-plugins
rename DENIED: ~/.copilot/installed-plugins/superpowers-marketplace
rename DENIED: ~/.copilot/installed-plugins/superpowers-marketplace/superpowers
rename OK : ~/.copilot/installed-plugins/superpowers-marketplace/superpowers/skills
creating and deleting a file inside those directories: OK
The denied set is exactly the store root, the marketplace root and the plugin root. One level deeper is free, and file I/O inside them works normally. That is the signature of one open directory handle per plugin root, opened without FILE_SHARE_DELETE, so the install/update step that replaces a plugin directory gets ACCESS_DENIED.
Worth noting for anyone else debugging this: Restart Manager reports no holders for any file under installed-plugins, because these are directory handles rather than file handles. The usual "which process has this file open" tooling shows nothing.
VS Code ships its own copy of the CLI (resources/app/node_modules.asar.unpacked/@github/copilot-win32-x64) and runs it against the same ~/.copilot home, registering itself in ~/.copilot/ide/<uuid>.lock. That instance appears to hold the handles for its whole lifetime.
Expected
Plugin install / update should work while an IDE-hosted CLI instance is running — e.g. open plugin directories with FILE_SHARE_DELETE, or release the handles after enumeration.
Impact
Anyone who keeps VS Code open cannot install or update any plugin, and the error message gives no hint about the cause. plugin uninstall hits the same error and can leave a partial state behind (marketplace entry removed, plugin directory still on disk).
Environment
- Windows 11 Enterprise 10.0.26200
- GitHub Copilot CLI 1.0.81-7
- VS Code 1.132.0
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ các đường dẫn cài đặt, cập nhật và gỡ cài đặt plugin thay thế các thư mục bên dưới ~/.copilot/installed-plugins, sau đó kiểm tra cách CLI được IDE lưu trữ liệt kê các thư mục gốc của plugin và giữ các handle thư mục. Tái hiện với VS Code đang chạy và xác minh rằng các thao tác plugin hoàn tất thành công, bao gồm cả việc gỡ cài đặt mà không để lại trạng thái dở dang.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- vscode
- Lĩnh vực
- cli, operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 50/100