Skip to content

Commit 612469a

Browse files
0xmohitbradfitz
authored andcommitted
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 208d4d2 commit 612469a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmd/go/bug.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ func runBug(cmd *Command, args []string) {
4242
env := newEnv
4343
env = append(env, extraEnvVars()...)
4444
for _, e := range env {
45-
fmt.Fprintf(&buf, "%s=\"%s\"\n", e.name, e.value)
45+
// Hide the TERM environment variable from "go bug".
46+
// See issue #18128
47+
if e.name != "TERM" {
48+
fmt.Fprintf(&buf, "%s=\"%s\"\n", e.name, e.value)
49+
}
4650
}
4751
printGoDetails(&buf)
4852
printOSDetails(&buf)

0 commit comments

Comments
 (0)