mirror of
https://github.com/golang/go
synced 2024-11-19 10:14:44 -07:00
cmd/go: avoid creating new empty environment variables
Broke some tests that assume $GORACE is unset (because it never is). Those tests are arguably wrong, but this is more robust. Change-Id: Id56daa160c9e7e01f301c1386791e410bbd5deef Reviewed-on: https://go-review.googlesource.com/6480 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
bfb8ad51d5
commit
8012a2e9c9
@ -158,8 +158,10 @@ func main() {
|
||||
// but in practice there might be skew
|
||||
// This makes sure we all agree.
|
||||
for _, env := range mkEnv() {
|
||||
if os.Getenv(env.name) != env.value {
|
||||
os.Setenv(env.name, env.value)
|
||||
}
|
||||
}
|
||||
|
||||
for _, cmd := range commands {
|
||||
if cmd.Name() == args[0] && cmd.Runnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user