Skip to content

Commit bc08e03

Browse files
committed
core/overreach: append to runtime envs var is pointless
1 parent fcad29c commit bc08e03

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

intra/core/overreach.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,12 @@ func SetRuntimeEnviron(key, val string) (found bool, err error) {
7070
for i, e := range envs {
7171
if len(e) >= len(kv) && e[:len(kv)] == kv {
7272
envs[i] = kv + val
73+
err = os.Setenv(key, val)
7374
found = true
7475
break
7576
}
7677
}
77-
if !found {
78-
envs = append(envs, kv+val)
79-
}
80-
return found, os.Setenv(key, val)
78+
return
8179
}
8280

8381
// GetRuntimeEnviron gets a value from the Go runtime's cached

0 commit comments

Comments
 (0)