From a01fda6b5226c3f1898056d1104c8bf7fc58ef99 Mon Sep 17 00:00:00 2001 From: djdv Date: Thu, 4 Aug 2022 18:23:32 -0400 Subject: [PATCH] make.bat: fix toolchain version setter Single quotes don't account for whitespace in this context, which causes output to look like this: '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) --- src/make.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/make.bat b/src/make.bat index 29a9cce8889..fb3eba7c3ba 100644 --- a/src/make.bat +++ b/src/make.bat @@ -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