You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uninstalling the current version exits 1 without a shell hook, and nothing is left in use #809
On Linux and macOS, uninstalling the version in use prints that vfox switched to another version, then fails with exit status 1, and no version is in use afterwards.
$ __VFOX_SHELL=bash vfox use --global <sdk>@2.0.0 # <sdk> has 1.0.0 and 2.0.0 installed
$ vfox uninstall <sdk>@2.0.0
Uninstalled <sdk>@2.0.0 successfully!
Auto switch to the other version.
vfox requires hook support. Please ensure vfox is properly initialized with 'vfox activate'
$ echo $?
1
$ vfox current <sdk>
no current version of <sdk>
1.0.0 stays installed, but nothing is in use. The same uninstall with __VFOX_SHELL=bash set exits 0 and makes 1.0.0 the global version.
The message comes from cmd/commands/uninstall.go (line 87), which prints it before source.Use runs. UseWithConfig in internal/sdk/sdk.go then returns the hook error (line 677) because the variable is missing. On Windows the same path switches to the global scope with a warning instead (line 672), so the Linux and macOS path could do the same, or the uninstall could report a clean state without the failing exit status.
Expected: exit status 0 after a successful uninstall, and a version in use if one is left.
Checked with vfox 1.1.0 on Linux. The code path is the same on main (69da1ba).
Activity
linghengqian commentedon Nov 21, 2026
@DeviousCardi I’d say you’re a bit late—there’s already a PR to address this issue. 🤣
fix(uninstall): switch the global version without the shell hook (ver…