Skip to content

Commit a7a4ba2

Browse files
authored
fix error parsing env values (fatedier#2886)
1 parent 915d9f4 commit a7a4ba2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/config/value.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ func init() {
2929
glbEnvs = make(map[string]string)
3030
envs := os.Environ()
3131
for _, env := range envs {
32-
kv := strings.Split(env, "=")
33-
if len(kv) != 2 {
32+
pair := strings.SplitN(env, "=", 2)
33+
if len(pair) != 2 {
3434
continue
3535
}
36-
glbEnvs[kv[0]] = kv[1]
36+
glbEnvs[pair[0]] = pair[1]
3737
}
3838
}
3939

0 commit comments

Comments
 (0)