Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: If .tool-versions exists in WorkingDirectory, CurTmpPath, and HomePath directories simultaneously, it will write multiple PATH entries #189

Closed
Chance-fyi opened this issue Apr 9, 2024 · 9 comments · Fixed by #197
Labels
bug Something isn't working

Comments

@Chance-fyi
Copy link
Member

Version
main
OS
Linux

Describe the bug
看到一个吐槽贴 https://learnku.com/articles/85977
使用 main 分支测试时意外发现一个 Bug

Screenshots[optional]
image

image

@Chance-fyi Chance-fyi added the bug Something isn't working label Apr 9, 2024
@Chance-fyi
Copy link
Member Author

好像是 install 的问题,有些版本 install 会加一条 PATH,有些版本则不会,太奇怪了

image

@bytemain
Copy link
Member

我觉得这个吐槽贴说的挺对的,现在 plugin 的命令和主要用来管理 sdk 的命令混杂起来,用起来心智负担很重,每次我都要想一下用哪个或者看一下 help

@aooohan
Copy link
Member

aooohan commented Apr 10, 2024

我觉得这个吐槽贴说的挺对的,现在 plugin 的命令和主要用来管理 sdk 的命令混杂起来,用起来心智负担很重,每次我都要想一下用哪个或者看一下 help

插件的:

  • vfox add
  • vfox info
  • vfox update
  • vfox remove
  • vfox avaiable

sdk的:

  • vfox install
  • vfox use
  • vfox search
  • vfox uninstall
  • vfox list
  • vfox current

我还是没明白为啥会混. 一开始确实想过在plugin命令前面加个plugin, 例如 vfox plugin add nodejs, 但是我嫌太长了命令.

@jan-bar
Copy link
Contributor

jan-bar commented Apr 10, 2024

image

当初我看到这个,内心震撼,相当炸裂。nodejs的用户有这种疑惑,我表示不意外。毕竟npm/yarn/pnpm包管理工具各有各的想法,而且我看pnpm文档,可以设置pnpm自己的包管理路径,就这意思是不想和npm/node一起切换的样子。

就连js运行时都有3个:nodejsdenobun

我只用了nodejs,另外两个没研究,不过估计也是各种不一致,需要区分命令啥的。前端太难学的,我还是继续go吧,😄😄😄

@aooohan
Copy link
Member

aooohan commented Apr 10, 2024

当初我看到这个,内心震撼,相当炸裂。nodejs的用户有这种疑惑,我表示不意外。毕竟npm/yarn/pnpm包管理工具各有各的想法,而且我看pnpm文档,可以设置pnpm自己的包管理路径,就这意思是不想和npm/node一起切换的样子。

我搞这个项目的初心就是因为, 我即 使用nvm又使用sdkman. 并且macos和windows有时来回切. 每个工具基本上命令都不一致真的很糟心. 😂😂

@bytemain
Copy link
Member

我还是没明白为啥会混. 一开始确实想过在plugin命令前面加个plugin, 例如 vfox plugin add nodejs, 但是我嫌太长了命令.

可能因为你是开发者,你知道所有命令的作用,对于新手来说,他不知道有哪些命令。

add 和 install

remove 和 uninstall

list 和 available

这都是相近的单词

@aooohan
Copy link
Member

aooohan commented Apr 10, 2024

add 和 install

remove 和 uninstall

list 和 available

这都是相近的单词

那目前看, 只能加前缀了. vfox plugin add/remove/update/available nodejs.

而且这些命令已经存在很久了, 只能两则都共存了.

@bytemain
Copy link
Member

这个再看反馈吧,感觉也不急着做

@subchen
Copy link

subchen commented Apr 11, 2024

感觉命令没啥问题,不容易混淆。

但是概念的定义还有点不清晰。

比如 plugin 的叫法,不好理解,建议改成 repo 或者 source

而 sdk 这个定义没问题。

@Chance-fyi Chance-fyi changed the title [BUG]: When switching versions, the old PATH was not deleted [BUG]: If .tool-versions exists in WorkingDirectory, CurTmpPath, and HomePath directories simultaneously, it will write multiple PATH entries Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants