]> Cypherpunks.ru repositories - gostls13.git/commitdiff
make.bat: handle spaces in path when determining bootstrap version
authordjdv <ddvpublic@Gmail.com>
Sat, 13 Aug 2022 17:32:26 +0000 (17:32 +0000)
committerGopher Robot <gobot@golang.org>
Sun, 14 Aug 2022 00:22:21 +0000 (00:22 +0000)
Single quotes don't account for whitespace in this context, which causes
output to look like this:

$ ./make.bat
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Building Go cmd/dist using C:\Program Files\Go. (go version =)

When it should look like this:

Building Go cmd/dist using C:\Program Files\Go. (go1.19 windows/amd64)

For #44505.

Change-Id: I71328add5c74bd2829c0e23224cfa6252395ff2c
GitHub-Last-Rev: a01fda6b5226c3f1898056d1104c8bf7fc58ef99
GitHub-Pull-Request: golang/go#54270
Reviewed-on: https://go-review.googlesource.com/c/go/+/421356
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/make.bat

index 29a9cce888986f99fe529f4eb3f742320aa34365..fb3eba7c3ba23f8c104dd60bed3bda4f9649e2be 100644 (file)
@@ -93,7 +93,7 @@ setlocal
 set GOOS=\r
 set GOARCH=\r
 set GOEXPERIMENT=\r
-for /f "tokens=*" %%g IN ('%GOROOT_BOOTSTRAP%\bin\go version') do (set GOROOT_BOOTSTRAP_VERSION=%%g)\r
+for /f "tokens=*" %%g IN ('"%GOROOT_BOOTSTRAP%\bin\go" version') do (set GOROOT_BOOTSTRAP_VERSION=%%g)\r
 set GOROOT_BOOTSTRAP_VERSION=%GOROOT_BOOTSTRAP_VERSION:go version =%\r
 echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%. (%GOROOT_BOOTSTRAP_VERSION%)\r
 if x%vflag==x-v echo cmd/dist\r