diff options
author | Dominic Della Valle <ddvpublic@Gmail.com> | 2020-09-13 17:03:48 +0000 |
---|---|---|
committer | Giovanni Bajo <rasky@develer.com> | 2020-09-13 19:17:09 +0000 |
commit | 66e66e71132034aa620ffbae9008f951da0f9f27 (patch) | |
tree | a51773d26a4caf18547508af29fdb3842c41ba38 /src/make.bat | |
parent | afb5fca25a6f59e9045317727f6899a58471d5f0 (diff) | |
download | go-66e66e71132034aa620ffbae9008f951da0f9f27.tar.gz go-66e66e71132034aa620ffbae9008f951da0f9f27.zip |
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: 809ddbb4dbc80d834f8108ca44c2826016d78d1c
GitHub-Pull-Request: golang/go#41319
Reviewed-on: https://go-review.googlesource.com/c/go/+/253898
Run-TryBot: Giovanni Bajo <rasky@develer.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Giovanni Bajo <rasky@develer.com>
Trust: Giovanni Bajo <rasky@develer.com>
Diffstat (limited to 'src/make.bat')
-rw-r--r-- | src/make.bat | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/make.bat b/src/make.bat index 277a34d5d7..b4a8e70849 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
)
)
|