diff --git a/tools/bootstrap/javascript.bat b/tools/bootstrap/javascript.bat index f4a33b2b40..42be2b77b9 100644 --- a/tools/bootstrap/javascript.bat +++ b/tools/bootstrap/javascript.bat @@ -1,4 +1,5 @@ @echo off +setlocal enabledelayedexpansion :: Call pwsh if available set "powershellCmd=powershell" @@ -7,21 +8,21 @@ if %errorlevel%==0 ( set "powershellCmd=pwsh" ) -call %powershellCmd% -NoLogo -ExecutionPolicy Bypass -File "%~dp0\javascript_.ps1" Download-Bun -for /f "tokens=* USEBACKQ" %%s in (` - call %powershellCmd% -NoLogo -ExecutionPolicy Bypass -File "%~dp0\javascript_.ps1" Get-Path +call %powershellCmd% -NoLogo -ExecutionPolicy Bypass -File "%~dp0javascript_.ps1" Download-Bun +for /f "usebackq delims=" %%s in (` + call %powershellCmd% -NoLogo -ExecutionPolicy Bypass -File "%~dp0javascript_.ps1" Get-Path `) do ( - set "PATH=%%s;%PATH%" + set "PATH=%%s;!PATH!" ) where bun.exe >nul 2>nul if %errorlevel% == 0 ( - echo | set /p printed_str="Using vendored Bun " + nul +exit /b %errorlevel%