Use known-working environment variable

This commit is contained in:
murgatroid99 2019-06-17 10:30:35 -07:00
parent 7c5f2ce826
commit c55edf7107
2 changed files with 3 additions and 5 deletions

View File

@ -44,7 +44,7 @@ const installWindows = () => {
return execa('npm', ['install', '--build-from-source'],
{cwd: nativeCoreDir, stdio: 'inherit'}).catch(() =>
del(path.resolve(process.env.USERPROFILE, '.node-gyp', process.versions.node, 'include/node/openssl'), { force: true }).then(() =>
del(path.resolve(process.env.CSIDL_LOCAL_APPDATA, 'node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() =>
del(path.resolve(process.env.USERPROFILE, 'AppData/node-gyp/cache', process.versions.node, 'include/node/openssl'), { force: true })).then(() =>
execa('npm', ['install', '--build-from-source'],
{cwd: nativeCoreDir, stdio: 'inherit'})
));

View File

@ -26,8 +26,6 @@ call npm update || goto :error
mkdir -p %ARTIFACTS_OUT%
@echo on
for %%a in (%arch_list%) do (
for %%v in (%node_versions%) do (
call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%%a
@ -35,8 +33,8 @@ for %%a in (%arch_list%) do (
@rem Try again after removing openssl headers
rmdir "%USERPROFILE%\.node-gyp\%%v\include\node\openssl" /S /Q
rmdir "%USERPROFILE%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q
rmdir "%CSIDL_LOCAL_APPDATA%\node-gyp\cache\%%v\include\node\openssl" /S /Q
rmdir "%CSIDL_LOCAL_APPDATA%\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q
rmdir "%USERPROFILE%\AppData\node-gyp\cache\%%v\include\node\openssl" /S /Q
rmdir "%USERPROFILE%\AppData\node-gyp\cache\iojs-%%v\include\node\openssl" /S /Q
call .\node_modules\.bin\node-pre-gyp.cmd build package --target=%%v --target_arch=%%a || goto :error
xcopy /Y /I /S build\stage\* %ARTIFACTS_OUT%\ || goto :error