aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/envcmd/env.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-07-10 07:19:17 -0700
committerIan Lance Taylor <iant@golang.org>2018-07-10 16:34:16 +0000
commitfa71076d242d0f9da48080dd9ddfd9c0f8a469cb (patch)
tree843815188bca7546e05564f1e969ddc05aa13a16 /src/cmd/go/internal/envcmd/env.go
parentf9800a94730eb6ead87017e6f829f58c4459870b (diff)
downloadgo-fa71076d242d0f9da48080dd9ddfd9c0f8a469cb.tar.gz
go-fa71076d242d0f9da48080dd9ddfd9c0f8a469cb.zip
cmd/go, cmd/cgo: only set TERM=dumb when running the compiler
The clang compiler on some terminals will issue colored error messages, which can confuse tools like cgo. To avoid this we used to set TERM=dumb for all programs started by the go tool. However, that confuses the pprof tool, which doesn't know whether to support fancy editing and colors itself. Instead, change the go tool and the cgo tool to set TERM=dumb where it matters--when invoking the C compiler--rather than in all cases. Updates #26254 Change-Id: I95174f961ac269a50a83f5f9d268219043cba968 Reviewed-on: https://go-review.googlesource.com/122975 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/go/internal/envcmd/env.go')
-rw-r--r--src/cmd/go/internal/envcmd/env.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
index bd66a98f21..1c5640f208 100644
--- a/src/cmd/go/internal/envcmd/env.go
+++ b/src/cmd/go/internal/envcmd/env.go
@@ -62,9 +62,6 @@ func MkEnv() []cfg.EnvVar {
{Name: "GOROOT", Value: cfg.GOROOT},
{Name: "GOTMPDIR", Value: os.Getenv("GOTMPDIR")},
{Name: "GOTOOLDIR", Value: base.ToolDir},
-
- // disable escape codes in clang errors
- {Name: "TERM", Value: "dumb"},
}
if work.GccgoBin != "" {