Skip to content

Commit eea9da9

Browse files
committed
Fix batch scripts
"tokens=*" is needed to handle spaces in path
1 parent 0b84729 commit eea9da9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

project/scripts/bootstrapCmdTests.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ call "%_SBT_CMD%" "dotty-bench-bootstrapped/jmh:run 1 1 -with-compiler compiler/
4242
if not %ERRORLEVEL%==0 ( set _EXITCODE=1& goto end )
4343

4444
echo testing scala.quoted.Expr.run from sbt dotr
45-
if %_DEBUG%==1 echo [%_BASENAME%] call "%_SBT_CMD%" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" ^> "%_TMP_FILE%"
46-
call "%_SBT_CMD%" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" > "%_TMP_FILE%"
45+
if %_DEBUG%==1 echo [%_BASENAME%] call "%_SBT_CMD%" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test"
46+
call "%_SBT_CMD%" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test"
4747
if not %ERRORLEVEL%==0 ( set _EXITCODE=1& goto end )
4848
call :grep "val a: scala.Int = 3" "%_TMP_FILE%"
4949
if not %_EXITCODE%==0 goto end
@@ -99,7 +99,7 @@ if exist "%__OUT_DIR%\" (
9999
)
100100
goto :eof
101101

102-
:grep
102+
:grep
103103
set __PATTERN=%~1
104104
set __FILE=%~2
105105

project/scripts/common.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if not %ERRORLEVEL%==0 (
4242
goto :eof
4343
)
4444
rem full path is required for sbt to run successfully
45-
for /f %%i in ('where sbt.bat') do set _SBT_CMD=%%i
45+
for /f "tokens=*" %%i in ('where sbt.bat') do set _SBT_CMD=%%i
4646

4747
rem see file project/scripts/sbt
4848
rem SBT uses the value of the JAVA_OPTS environment variable if defined, rather than the config.

0 commit comments

Comments
 (0)