Commit 6a9b9888 authored by Shenghou Ma's avatar Shenghou Ma

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

It's implementation detail.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/63690043
parent af545660
......@@ -85,18 +85,16 @@ func runEnv(cmd *Command, args []string) {
return
}
switch runtime.GOOS {
default:
for _, e := range env {
fmt.Printf("%s=\"%s\"\n", e.name, e.value)
}
case "plan9":
for _, e := range env {
fmt.Printf("%s='%s'\n", e.name, strings.Replace(e.value, "'", "''", -1))
}
case "windows":
for _, e := range env {
fmt.Printf("set %s=%s\n", e.name, e.value)
for _, e := range env {
if e.name != "TERM" {
switch runtime.GOOS {
default:
fmt.Printf("%s=\"%s\"\n", e.name, e.value)
case "plan9":
fmt.Printf("%s='%s'\n", e.name, strings.Replace(e.value, "'", "''", -1))
case "windows":
fmt.Printf("set %s=%s\n", e.name, e.value)
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment