Skip to content
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

cmd/go: missing newline in "unsupported GOOS/GOARCH" error message #35984

Closed
rhysh opened this issue Dec 5, 2019 · 1 comment
Closed

cmd/go: missing newline in "unsupported GOOS/GOARCH" error message #35984

rhysh opened this issue Dec 5, 2019 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rhysh
Copy link
Contributor

rhysh commented Dec 5, 2019

What version of Go are you using (go version)?

$ go-tip version
go version devel +9a8b497240 Thu Dec 5 02:00:50 2019 +0000 darwin/amd64

Does this issue reproduce with the latest release?

The problem is present in tip, and not in go1.13.3. I bisected it to 4d4ddd8.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/rhys/Library/Caches/go-build"
GOENV="/Users/rhys/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY="*"
GONOSUMDB="*"
GOOS="darwin"
GOPATH="/Users/rhys/go"
GOPRIVATE="*"
GOPROXY="direct"
GOROOT="/usr/local/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/49/zmds5zsn75z1283vtzxyfr5hj7yjq4/T/go-build748440850=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I ran a go command with an invalid GOOS/GOARCH combination.

What did you expect to see?

$ go1.13 version
go version go1.13.3 darwin/amd64
$ GOOS=nope go1.13 env GOOS 2>&1 | xxd
00000000: 636d 642f 676f 3a20 756e 7375 7070 6f72  cmd/go: unsuppor
00000010: 7465 6420 474f 4f53 2f47 4f41 5243 4820  ted GOOS/GOARCH 
00000020: 7061 6972 206e 6f70 652f 616d 6436 340a  pair nope/amd64.

I expected the go tool's output in that error case to end with a newline so I could easily read the message.

What did you see instead?

$ go-tip version
go version devel +9a8b497240 Thu Dec 5 02:00:50 2019 +0000 darwin/amd64
$ GOOS=nope go-tip env GOOS 2>&1 | xxd
00000000: 636d 642f 676f 3a20 756e 7375 7070 6f72  cmd/go: unsuppor
00000010: 7465 6420 474f 4f53 2f47 4f41 5243 4820  ted GOOS/GOARCH 
00000020: 7061 6972 206e 6f70 652f 616d 6436 34    pair nope/amd64

The printed error text doesn't end with a newline, so it ends up as a prefix to my terminal prompt and is hard to read.

@gopherbot
Copy link

Change https://golang.org/cl/209965 mentions this issue: cmd/go: print newline after GOOS/GOARCH error

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 5, 2019
@dmitshur dmitshur added this to the Go1.14 milestone Dec 5, 2019
@golang golang locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants