Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/version-fox/vfox
Browse files Browse the repository at this point in the history
  • Loading branch information
aooohan committed Mar 4, 2024
2 parents fb08ec7 + f344606 commit 4bd73ce
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
15 changes: 14 additions & 1 deletion docs/guides/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.
:::
15 changes: 12 additions & 3 deletions docs/zh-hans/guides/faq.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# 常见问题


## 切换xxx不生效? `vfox use`命令不生效?

如果你看到提示`Warning: The current shell lacks hook support or configuration. It has switched to global scope automatically`
则说明你没有将`vfox`正确挂在到你的`Shell`上。

请按照[快速入门#_2-挂载vfox到你的shell](./quick-start.md#_2-挂载vfox到你的shell)步骤进行手动挂载。


## 为什么我删除不了插件?

```text
Expand All @@ -27,4 +25,15 @@
$ vfox remove nodejs
```

在删除之前, 你可以使用`vfox ls`查看当前已安装的插件(即SDK名称), 然后再进行删除。
在删除之前, 你可以使用`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次, 请反馈给我们。
:::
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

package internal

const RuntimeVersion = "0.2.3"
const RuntimeVersion = "0.2.4"

0 comments on commit 4bd73ce

Please sign in to comment.