This commit is contained in:
silicons
2021-04-25 14:17:37 -07:00
parent cf69e0fb69
commit 12894384ff
119 changed files with 12403 additions and 1483 deletions
+19 -2
View File
@@ -4,6 +4,23 @@ if %errorlevel% == 0 (
echo | set /p printed_str="Using system-wide Node "
call node.exe --version
call node.exe %*
) else (
call powershell.exe -NoLogo -ExecutionPolicy Bypass -File "%~dp0\node_.ps1" %*
goto exit_with_last_error_level
)
call powershell -NoLogo -ExecutionPolicy Bypass -File "%~dp0\node_.ps1" Download-Node
for /f "tokens=* USEBACKQ" %%s in (`
call powershell -NoLogo -ExecutionPolicy Bypass -File "%~dp0\node_.ps1" Get-Path
`) do (
set "PATH=%%s;%PATH%"
)
where node.exe >nul 2>nul
if %errorlevel% == 0 (
echo | set /p printed_str="Using vendored Node "
call node.exe --version
call node.exe %*
goto exit_with_last_error_level
)
echo "build.bat: Failed to bootstrap Node!"
%COMSPEC% /c exit 1
:exit_with_last_error_level
if not %errorlevel% == 0 %COMSPEC% /c exit %errorlevel% >nul