Issues auto-updating CLI
Describe the bug
It took 3 sessions to get the latest version of the CLI.
Affected version
1.0.11 and 1.0.14
Steps to reproduce the behavior
- I just started a new Copilot CLI terminal in VS Code Insiders (opened an integrated terminal, typed
copilotmyself, then asked one question), and I got an updating error after the CLI responded to my question. I'm usingv1.0.11of the CLI.
Error auto updating: Failed to download package: Error: ENOENT: no such file or directory, rename 'C:\Users\brmurtau.copilot\pkg\universal\1.0.14-0' -> 'C:\Users\brmurtau.copilot\pkg\universal.replaced-1.0.14-0-34924-1774894188189'
- I tried completely killing the terminal, opening a new one, and typing
copilotand the same prompt again, and now I don't get the auto updating error message, but I do see there's a new version of the CLI (v1.0.14-0) that I wasn't auto-updated to - If I kill the terminal again and then complete the same steps a third time, now I'm updated to
v1.0.14-0
Expected behavior
Auto-updating works correctly the first time I open a new terminal.
Additional context
No response
I've seen this in Windows Terminal several times lately. If I just run copilot update again it succeeds.
I've tried it a few times now, trying to get updated to 1.0.13, and I get that same error message if I run it from within Windows Terminal via copilot update (tried multiple times both as normal user and with an admin prompt as well). Additionally, I get the same error when running copilot update within an integrated terminal in VS Code or running Copilot CLI via the VS Code Terminal via the /update command.
I am also running 1.0.11 as well.
I was just able to update to 1.0.14 on one of the same machines I was testing updating to 1.0.13 using copilot update on the very first try. I'm but a single data point, but the issue I was seeing was likely related to the 1.0.13 release specifically.
Same issue going from 1.0.14 to 1.0.16. Thanks to @jongalloway for the update prompt.
A workaround is to delete the pkg folder in C:\Users\xyz\AppData\Local\copilot\pkg - this is at least working to me based on my analysis from #2583
At least for me, closing Visual Studio and Visual Studio Code before running the update command works. Looks like Visual Studio is holding a lock on the .copilot folder while its running
This appears to be resolved as of GitHub Copilot CLI v1.0.88. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.