From b828dcf04ba04056d78522b1aafd6226f463a8f1 Mon Sep 17 00:00:00 2001 From: lihan Date: Mon, 4 Mar 2024 17:16:49 +0800 Subject: [PATCH 1/2] doc: PATH duplicate problem --- docs/guides/faq.md | 15 ++++++++++++++- docs/zh-hans/guides/faq.md | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/guides/faq.md b/docs/guides/faq.md index 4e2af0e2..59ab97b5 100644 --- a/docs/guides/faq.md +++ b/docs/guides/faq.md @@ -31,4 +31,17 @@ So, when deleting the plugin, you need to use the **SDK name** (here is `nodejs` $ vfox remove nodejs ``` -before deleting, you can use `vfox ls` to view the currently installed plugins (i.e. SDK names), and then delete them. \ No newline at end of file +before deleting, you can use `vfox ls` to view the currently installed plugins (i.e. SDK names), and then delete them. + +## Why does the PATH environment variable value repeat on Windows? + +Only one situation will cause this, that is, you have used the SDK globally (`vfox use -g`), at this time, `vfox` will +operate the registry and write the SDK's `PATH` into the user environment variable (for the purpose of, **Shell that does not +support Hook function** can also use SDK, such as `CMD`). + +But because of the existence of the `.tool-versions` mechanism, the `PATH` becomes the sum of `.tool-verions` and the user +environment variable `PATH`. + +::: warning +The same SDK **can be repeated at most twice**, it will not be repeated indefinitely. If >2 times, please feedback to us. +::: diff --git a/docs/zh-hans/guides/faq.md b/docs/zh-hans/guides/faq.md index 144b4185..f39a06a0 100644 --- a/docs/zh-hans/guides/faq.md +++ b/docs/zh-hans/guides/faq.md @@ -1,6 +1,5 @@ # 常见问题 - ## 切换xxx不生效? `vfox use`命令不生效? 如果你看到提示`Warning: The current shell lacks hook support or configuration. It has switched to global scope automatically` @@ -8,7 +7,6 @@ 请按照[快速入门#_2-挂载vfox到你的shell](./quick-start.md#_2-挂载vfox到你的shell)步骤进行手动挂载。 - ## 为什么我删除不了插件? ```text @@ -27,4 +25,15 @@ $ vfox remove nodejs ``` -在删除之前, 你可以使用`vfox ls`查看当前已安装的插件(即SDK名称), 然后再进行删除。 \ No newline at end of file +在删除之前, 你可以使用`vfox ls`查看当前已安装的插件(即SDK名称), 然后再进行删除。 + +## Windows下PATH环境变量值重复? + +只有一种情况下会出现这种情况, 就是你全局(`vfox use -g`)使用过SDK, 这个时候`vfox`会操作注册表,将SDK的`PATH`写入用户环境变量当中(为的是, +**不支持Hook功能**的Shell也能使用SDK, 例如`CMD`)。 + +但是因为`.tool-versions`机制的存在, 所以`PATH`就变成了`.tool-verions` + 用户环境变量`PATH`两部分组成。 + +::: warning +同一个SDK**最多重复两条**, 不会无限重复。如果>2次, 请反馈给我们。 +::: \ No newline at end of file From f344606e563d604b95f6918cb676d29b66cb5613 Mon Sep 17 00:00:00 2001 From: lihan Date: Mon, 4 Mar 2024 17:19:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?release=20v0.2.4=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/version.go b/internal/version.go index 5ad14d64..aaa4bae9 100644 --- a/internal/version.go +++ b/internal/version.go @@ -16,4 +16,4 @@ package internal -const RuntimeVersion = "0.2.3" +const RuntimeVersion = "0.2.4"