diff --git a/vcbuild.bat b/vcbuild.bat index fd98867a12a46c..fe0bd63fd56fc3 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -497,11 +497,11 @@ for /d %%F in (test\addons-napi\??_*) do ( rd /s /q %%F ) :: building addons-napi -for /d %%F in (test\addons-napi\*) do ( - %node_gyp_exe% rebuild ^ - --directory="%%F" ^ - --nodedir="%cd%" -) +setlocal +set npm_config_nodedir=%~dp0 +"%node_exe%" "%~dp0tools\build-addons.js" "%~dp0deps\npm\node_modules\node-gyp\bin\node-gyp.js" "%~dp0test\addons-napi" +if errorlevel 1 exit /b 1 +endlocal endlocal goto run-tests