version-fox / vfox-nodejs

Node.js plugin for vfox
https://vfox.lhan.me
Apache License 2.0
8 stars 4 forks source link

vfox use nodejs@<version> doesn't switch versions with msys2 windows #10

Closed jcrben closed 5 months ago

jcrben commented 6 months ago

It switches versions on a successful install, but not from vfox use command.

Activation: [[ $(command -v vfox) ]] && eval "$(vfox activate bash)"

ben@lenovo-legion ~$ echo $BASH_VERSION
5.2.26(1)-release
ben@lenovo-legion ~$ vfox install nodejs@20
Preinstalling nodejs@20.12.2...
Downloading... 100% [=====================================================================================================================] (38 MB/s)
Verifying checksum 66dda1717cae30a13be6bb17ad96ee54b69f2c23c85acd9c3299b095fa26b452...
Unpacking C:\Users\ben\.version-fox\cache\nodejs\node-v20.12.2-win-x64.zip...
Install nodejs@20.12.2 success!
Please use vfox use nodejs@20.12.2 to use it.
ben@lenovo-legion ~$ node --version
v20.12.2
ben@lenovo-legion ~$ vfox use nodejs@22
Now using nodejs@22.1.0.
ben@lenovo-legion ~$ node --version
v20.12.2
ben@lenovo-legion ~$ vfox install nodejs@22
nodejs@22.1.0 is already installed
failed to install nodejs
ben@lenovo-legion ~$ vfox uninstall nodejs@22
nodejs@22 is not installed
ben@lenovo-legion ~$ vfox uninstall nodejs@22.1.0
Uninstalled nodejs@22.1.0 successfully!
ben@lenovo-legion ~$ vfox install nodejs@22
Preinstalling nodejs@22.1.0...
Downloading... 100% [=====================================================================================================================] (20 MB/s)
Verifying checksum 4b0f90bc3f1f41df16f9022ecded0c4eff55f8c3ece66ba348275c69fea4eb8e...
Unpacking C:\Users\ben\.version-fox\cache\nodejs\node-v22.1.0-win-x64.zip...
Install nodejs@22.1.0 success!
Please use vfox use nodejs@22.1.0 to use it.
ben@lenovo-legion ~$ vfox list
All installed sdk versions
├─┬java
│ └──v21.0.2+13
└─┬nodejs
  ├──v22.1.0
  └──v20.12.2

ben@lenovo-legion ~$ vfox use v22.1.0
v22.1.0 not supported, error: v22.1.0 not installed
ben@lenovo-legion ~$ vfox use nodejs v22.1.0
Please select a version of nodejs:
  -> 22.1.0
Now using nodejs@22.1.0.
ben@lenovo-legion ~$ vfox use nodejs v20.12.0
Please select a version of nodejs:
  -> 20.12.2
Now using nodejs@20.12.2.
ben@lenovo-legion ~$ node --version
v20.12.2
ben@lenovo-legion ~$ vfox use nodejs v22.1.0
Please select a version of nodejs:
  -> 22.1.0
Now using nodejs@22.1.0.
ben@lenovo-legion ~$ node --version
v20.12.2
aooohan commented 5 months ago

Can you try again using the latest 0.5.0?

jcrben commented 5 months ago

Looks to be resolved