Npm is modifying process environment variables before running postinstall script. Especially, it adds %APPDATA%\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin to the PATH variable. This pollutes users PATH variable and for some users breaks node-gyp (e.g.: https://github.com/nodejs/node-gyp/issues/1760, https://github.com/nodejs/node-gyp/issues/1633, but there are more)
This PR makes set-enviroment.ps1 use users variable value (not the current process one) when adding Python to the users PATH variable.
Npm is modifying process environment variables before running postinstall script. Especially, it adds
%APPDATA%\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin
to the PATH variable. This pollutes users PATH variable and for some users breaks node-gyp (e.g.: https://github.com/nodejs/node-gyp/issues/1760, https://github.com/nodejs/node-gyp/issues/1633, but there are more)This PR makes
set-enviroment.ps1
use users variable value (not the current process one) when adding Python to the users PATH variable.