volta-cli/volta

`volta install node` on Windows incorrectly shows a warning about Node being shadowed

Closed this issue · 1 comments

On Windows using the MSI installer, the shims for Node, Yarn, npm, etc. are installed into the Program Files directory. However, our check for whether a command is shadowed (https://github.com/volta-cli/volta/blob/main/crates/volta-core/src/tool/mod.rs#L240) only checks the Shim directory inside of VOLTA_HOME. This results in showing the message about node being shadowed, even though it actually isn't, because it's in the correct spot.

We should update the check_shim_reachable function to properly handle Windows as well.

it still happens with pnpm
image

volta 2.0.1