From fa71076d242d0f9da48080dd9ddfd9c0f8a469cb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 10 Jul 2018 07:19:17 -0700 Subject: 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/cmd/go/internal/envcmd/env.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/cmd/go/internal/envcmd/env.go') 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 != "" { -- cgit v1.2.1