Installing a different version through npm does not work
Describe the bug
When I already have copilot installed, and I try to install a different version using (for example):
npm install -g @github/[email protected]
The npm command says it updated the packages, but when I run copilot, the current version (0.0.397) remains in place.
This is frustrating, especially when newer versions have bugs/regressions that completely break my process.
Affected version
0.0.397
Steps to reproduce the behavior
On a computer with Copilot installed with npm, run:
npm install -g @github/copilot@<version>
Where <version> is a version that is different than the version currently installed.
Expected behavior
I would expect Copilot to respect the version installed (or uninstalled) by my selected package manager.
Additional context
No response
Apologies for the inconvenience here @maxatchief1, if you run with --no-auto-update that should respect the installed version. Also, if you were affected by the 'invalid session id' issue on 0.0.397, we just published 0.0.398 addressing the issue.
I appreciate the workarounds you have available.
However,
- Any application that doesn't respect the package manager it was installed through as its default behavior is unintuitive.
- I don't want to have to add
--no-auto-updateonto my copilot command every time I run it.
@maxatchief1 that's fair. You can persist the --no-auto-update preference by adding "auto_update": false to your .copilot/config.json file.
That config doesn't seem to work:
$ copilot --version
GitHub Copilot CLI 0.0.400.
Run 'copilot update' to check for updates.
$ copilot --version --no-auto-update
0.0.384
Commit: 0b21260
As you can see, I still need the --no-auto-update flag.
I can confirm that the behavior is different, i.e. this is not just the shown version that is wrong.
Here's the config I used:
{
"auto_update": false
}
Ah sorry you're right @antoyo the auto_update config only currently prevents it from downloading new updates, doesn't prevent it from loading the latest downloaded. Will get that fix. If you rm -rf ~/.copilot/pkg/ (or $XDG_CONFIG_HOME/.copilot/pkg) that should give you a workaround in the meantime.