From 809ddbb4dbc80d834f8108ca44c2826016d78d1c Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Thu, 10 Sep 2020 10:05:45 -0400 Subject: [PATCH] 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. --- src/make.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/make.bat b/src/make.bat index 277a34d5d7a0e2..b4a8e7084905e5 100644 --- a/src/make.bat +++ b/src/make.bat @@ -77,7 +77,7 @@ if not "x%GOROOT_BOOTSTRAP%"=="x" goto bootstrapset for /f "tokens=*" %%g in ('where go 2^>nul') do ( if "x%GOROOT_BOOTSTRAP%"=="x" ( for /f "tokens=*" %%i in ('%%g env GOROOT 2^>nul') do ( - if /I not %%i==%GOROOT_TEMP% ( + if /I not "%%i"=="%GOROOT_TEMP%" ( set GOROOT_BOOTSTRAP=%%i ) )