OpenBazaar-Installer icon indicating copy to clipboard operation
OpenBazaar-Installer copied to clipboard

Windows: User environment variable PATH is overwritten

Open AronVanAmmers opened this issue 9 years ago • 1 comments

After running the installer (a build downloaded on 2015-10-22), I noticed I could no longer execute npm packages which were installed globally.

When debugging that, I noticed that my Path variable (System > Advanced System Settings > tab Advanced> Environment Variables > User variables for [Username]) was now as below:

%PATH%;C:\Users\Aron\AppData\Local\OpenBazaar\python27;C:\Users\Aron\AppData\Local\OpenBazaar\python27\scripts;%AppData%\npm\node_modules

Before installing it contained other paths, including the global npm path.

I believe this line overwrites that variable instead of amending it:

[Environment]::SetEnvironmentVariable("PATH", "%PATH%;$INSTDIR\python27;$INSTDIR\python27\Scripts", "User")

AronVanAmmers avatar Oct 29 '15 15:10 AronVanAmmers

Interesting. I will take a look and see what's going on with that. I don't believe that line will be necessary in the updated installer build script as well.

hoffmabc avatar Oct 29 '15 15:10 hoffmabc