mirror of
https://github.com/golang/go
synced 2024-09-28 23:24:33 -06:00
make.bat: support existing toolchain paths with spaces
Previously if the default go toolchain (from "where go") contained spaces, then running make.bat would fail.
Fixes it to correctly treat paths with spaces. This is especially useful given that the default Go install path is under "C:\Program Files".
Fixes #57918
Change-Id: Icacf8dd5178b608225f02e4a11a8753d78bed262
GitHub-Last-Rev: 4cd8a790e4
GitHub-Pull-Request: golang/go#57836
Reviewed-on: https://go-review.googlesource.com/c/go/+/462275
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
parent
9894ded194
commit
f89badf6b4
@ -73,7 +73,7 @@ if not exist ..\bin\tool mkdir ..\bin\tool
|
||||
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 (
|
||||
for /f "tokens=*" %%i in ('"%%g" env GOROOT 2^>nul') do (
|
||||
if /I not "%%i"=="%GOROOT_TEMP%" (
|
||||
set GOROOT_BOOTSTRAP=%%i
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user