cmd/go: hide the "TERM" environment variable from "go bug"

Fixes #18128

Change-Id: I5530c9d774a1e398cd759a05bbf308e6e42f0007
Reviewed-on: https://go-review.googlesource.com/33810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Mohit Agarwal 2016-12-01 23:20:03 +05:30 committed by Brad Fitzpatrick
parent 208d4d2227
commit 612469ab0b

View file

@ -42,7 +42,11 @@ func runBug(cmd *Command, args []string) {
env := newEnv
env = append(env, extraEnvVars()...)
for _, e := range env {
fmt.Fprintf(&buf, "%s=\"%s\"\n", e.name, e.value)
// Hide the TERM environment variable from "go bug".
// See issue #18128
if e.name != "TERM" {
fmt.Fprintf(&buf, "%s=\"%s\"\n", e.name, e.value)
}
}
printGoDetails(&buf)
printOSDetails(&buf)