Skip to content

Commit 66e66e7

Browse files
djdvrasky
authored andcommitted
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. For example, consider the path `C:\Users\Dominic Della Valle\Projects\Go\goroot\src` Issuing `make.bat` will print out `'Della' is not recognized as an internal or external command, operable program or batch file.` before proceeding. Change-Id: Ifcec159baeec940c29c61aa721c64c13c6fd8c14 GitHub-Last-Rev: 809ddbb GitHub-Pull-Request: #41319 Reviewed-on: https://go-review.googlesource.com/c/go/+/253898 Run-TryBot: Giovanni Bajo <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Giovanni Bajo <[email protected]> Trust: Giovanni Bajo <[email protected]>
1 parent afb5fca commit 66e66e7

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)