volta icon indicating copy to clipboard operation
volta copied to clipboard

Installation breaks PATH on Windows

Open ofek opened this issue 1 year ago • 3 comments

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 avatar Nov 05 '24 03:11 ofek

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

  • https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagetimeoutw
  • https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-settingchange

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 😅

ofek avatar Nov 05 '24 03:11 ofek

This is still broken.

ofek avatar May 27 '25 15:05 ofek

Yeah the Volta installer just nuked half my PATH variable... :/ Good thing I still had VS Code open ._.

RuiNtD avatar Aug 09 '25 20:08 RuiNtD