Skip to content

Commit 00d865b

Browse files
committed
make.bat: fix compare between GOROOT and srcdir paths, when either contains whitespace.
CL 96455 brings CL 57753 to Windows However, a path comparison within it was left unquoted. If the Go source directory resides in a path containing whitespace, the interpreter will compare against the first portion of the path string, and treat the remainder as an expression. This patch amends that.
1 parent 07d19b2 commit 00d865b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ if not "x%GOROOT_BOOTSTRAP%"=="x" goto bootstrapset
7777
for /f "tokens=*" %%g in ('where go 2^>nul') do (
7878
if "x%GOROOT_BOOTSTRAP%"=="x" (
7979
for /f "tokens=*" %%i in ('%%g env GOROOT 2^>nul') do (
80-
if /I not %%i==%GOROOT_TEMP% (
80+
if /I not "%%i"=="%GOROOT_TEMP%" (
8181
set GOROOT_BOOTSTRAP=%%i
8282
)
8383
)

0 commit comments

Comments
 (0)