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: "go bug" reports TERM="dumb" #18128

Closed
kevinburke opened this issue Dec 1, 2016 · 4 comments
Closed

cmd/go: "go bug" reports TERM="dumb" #18128

kevinburke opened this issue Dec 1, 2016 · 4 comments

Comments

@kevinburke
Copy link
Contributor

kevinburke commented Dec 1, 2016

Please answer these questions before submitting your issue. Thanks!

What did you do?

go bug

What did you expect to see?

I expected to see TERM=xterm-256color in the "System details" output (my terminal's setting).

What did you see instead?

TERM="dumb"

Does this issue reproduce with the latest release (go1.7.3)?

No

System details

You can see the incorrect output below:

go version devel +5dd4d6edb8 Wed Nov 30 22:31:18 2016 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kevin/code/go"
GORACE=""
GOROOT="/Users/kevin/go"
GOTOOLDIR="/Users/kevin/go/pkg/tool/darwin_amd64"
TERM="dumb"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dx/x6gx95t14n7bb3v878968fkm0000gn/T/go-build055303932=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version devel +5dd4d6edb8 Wed Nov 30 22:31:18 2016 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +5dd4d6edb8 Wed Nov 30 22:31:18 2016 +0000 X:framepointer
uname -v: Darwin Kernel Version 15.6.0: Thu Sep  1 15:01:16 PDT 2016; root:xnu-3248.60.11~2/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G1108
lldb --version: lldb-360.1.65

I think it comes from here?

		// disable escape codes in clang errors
		{"TERM", "dumb"},

It's not present in the output of "go env", though.

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kevin/code/go"
GORACE=""
GOROOT="/Users/kevin/go"
GOTOOLDIR="/Users/kevin/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dx/x6gx95t14n7bb3v878968fkm0000gn/T/go-build229105624=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
@bradfitz bradfitz added this to the Go1.8Maybe milestone Dec 1, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Dec 1, 2016

/cc @josharian

@bradfitz bradfitz changed the title "go bug" reports TERM="dumb" cmd/go: "go bug" reports TERM="dumb" Dec 1, 2016
@0xmohit
Copy link
Contributor

0xmohit commented Dec 1, 2016

It appears that TERM was set to dumb to make clang errors legible. See c485b58 and 6a9b988

Maybe remove the variable from go bug output?

@minux
Copy link
Member

minux commented Dec 1, 2016 via email

@gopherbot
Copy link

CL https://golang.org/cl/33810 mentions this issue.

@golang golang locked and limited conversation to collaborators Dec 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants