volta-cli / volta

Volta: JS Toolchains as Code. ⚡
https://volta.sh
Other
11.2k stars 238 forks source link

Installation breaks PATH on Windows #1933

Open ofek opened 3 weeks ago

ofek commented 3 weeks ago

My machine got messed up so I went looking and I believe the code is here. The setx command limits variables to length 1024.

The proper solution is to write using the registry as that code in the first link does for reading.

Side note: I notice that setup adds C:\Users\ofek\AppData\Local\Volta\bin to the user PATH and C:\Program Files\Volta\ to the system PATH. For the latter, I would recommend removing the trailing backslash as it's unnecessary.

ofek commented 3 weeks ago

It may also be nice to broadcast the change across existing windows using the following:

I'm glad the current behavior doesn't do that however because the only way I was able to recover the previous PATH was from printing it out in an existing window 😅