-
Notifications
You must be signed in to change notification settings - Fork 18k
x/build/cmd/gorebuild: uses wrong path separator for running make.bat on Windows #61951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
seem to be https://github.com/golang/go/blob/master/src/os/exec/lp_windows.go#L101 Causing this issue. --- FAIL: TestCommand (3.59s) |
Does this issue reproduces with go1.21? Else, can it be a regression from CL 512155? |
Both go1.21.0 and tip will reproduce on my computer. |
@gopherbot, please backport to Go 1.21. This is a regression from previous Go releases. |
Backport issue(s) opened: #61957 (for 1.21). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
@bcmills I don't think this is a regression. I can reproduce the same issue with all previous versions till at least go 1.12 using this self-contained reproducer: package main
import (
"fmt"
"io/ioutil" // for compatibility with old Go versions
"os"
"os/exec"
)
func main() {
const make = "./make.bat"
err := ioutil.WriteFile(make, []byte("echo \"Hello\""), 0666)
if err != nil {
fmt.Printf("error writing make.bat: %s", err)
os.Exit(1)
}
out, err := exec.Command(make).CombinedOutput()
if err != nil {
fmt.Printf("%s: %s\n%s", make, err, out)
os.Exit(1)
}
fmt.Printf("%s completed:\n%s", make, out)
} C:\Users\qmuntaldiaz\code\gotest>go1.12.1 run main.go
./make.bat: exit status 1
'.' is not recognized as an internal or external command,
operable program or batch file.
exit status 1 The issue is fixed if replacing Same behavior if using just cmd: C:\Users\qmuntaldiaz\code\gotest>./make.bat
'.' is not recognized as an internal or external command,
operable program or batch file. |
Change https://go.dev/cl/518735 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
On the Winwods computer.
go install golang.org/x/build/cmd/gorebuild@latest
gorebuild windows-amd64
What did you expect to see?
Program runs normally.
What did you see instead?
12:58:06.689 downloaded https://go.dev/dl/?mode=json&include=all
12:58:07.058 [bootstrap go1.17] using go1.17.13 binary distribution for go1.17
12:59:16.161 [bootstrap go1.17] downloaded https://go.dev/dl/go1.17.13.windows-amd64.zip
12:59:44.885 [go1.21.0] downloaded https://go.googlesource.com/go/+archive/refs/tags/go1.21.0.tar.gz
12:59:44.885 [go1.21.0.windows-amd64.zip] start go1.21.0.windows-amd64.zip
12:59:58.284 [go1.21.0.windows-amd64.zip] running ./make.bat env=[GOOS=windows GOARCH=amd64] args=[-distpack]
GOROOT=E:\TEMP\gorebuild-4074831885\repro-go1.21.0-windows-amd64
GOROOT_BOOTSTRAP=E:\TEMP\gorebuild-4074831885\bootstrap-go1.17\go
12:59:58.357 [go1.21.0.windows-amd64.zip] ./make.bat: exit status 1
'.' is not recognized as an internal or external command,
operable program or batch file.
13:00:07.187 [go1.21.0.windows-amd64.zip] FAIL: ./make.bat in E:\TEMP\gorebuild-4074831885\repro-go1.21.0-windows-amd64 failed
13:00:07.189 [go1.21.0.src.tar.gz] FAIL: file not checked
13:00:07.189 [go1.21.0] FAIL: go1.21.0.src.tar.gz did not verify
13:00:07.190 [go1.21.0.windows-amd64.msi] FAIL: file not checked
13:00:07.190 [go1.21.0] FAIL: go1.21.0.windows-amd64.msi did not verify
13:00:07.190 [go1.21.0] FAIL: go1.21.0.windows-amd64.zip did not verify
13:00:07.190 [v0.0.1-go1.21.0.windows-amd64.info] FAIL: file not checked
13:00:07.190 [go1.21.0] FAIL: v0.0.1-go1.21.0.windows-amd64.info did not verify
13:00:07.191 [v0.0.1-go1.21.0.windows-amd64.mod] FAIL: file not checked
13:00:07.191 [go1.21.0] FAIL: v0.0.1-go1.21.0.windows-amd64.mod did not verify
13:00:07.191 [v0.0.1-go1.21.0.windows-amd64.zip] FAIL: file not checked
13:00:07.192 [go1.21.0] FAIL: v0.0.1-go1.21.0.windows-amd64.zip did not verify
13:00:07.193 FAIL: go1.21.0 did not verify
The text was updated successfully, but these errors were encountered: