Skip to content

Commit

Permalink
make.bat: handle spaces in path when determining bootstrap version
Browse files Browse the repository at this point in the history
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: a01fda6
GitHub-Pull-Request: #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>
  • Loading branch information
djdv authored and gopherbot committed Aug 14, 2022
1 parent 45c748f commit beaa571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ setlocal
set GOOS=
set GOARCH=
set GOEXPERIMENT=
for /f "tokens=*" %%g IN ('%GOROOT_BOOTSTRAP%\bin\go version') do (set GOROOT_BOOTSTRAP_VERSION=%%g)
for /f "tokens=*" %%g IN ('"%GOROOT_BOOTSTRAP%\bin\go" version') do (set GOROOT_BOOTSTRAP_VERSION=%%g)
set GOROOT_BOOTSTRAP_VERSION=%GOROOT_BOOTSTRAP_VERSION:go version =%
echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%. (%GOROOT_BOOTSTRAP_VERSION%)
if x%vflag==x-v echo cmd/dist
Expand Down

0 comments on commit beaa571

Please sign in to comment.