mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
fix error parsing env values (#2886)
This commit is contained in:
parent
915d9f4c09
commit
a7a4ba270d
@ -29,11 +29,11 @@ func init() {
|
|||||||
glbEnvs = make(map[string]string)
|
glbEnvs = make(map[string]string)
|
||||||
envs := os.Environ()
|
envs := os.Environ()
|
||||||
for _, env := range envs {
|
for _, env := range envs {
|
||||||
kv := strings.Split(env, "=")
|
pair := strings.SplitN(env, "=", 2)
|
||||||
if len(kv) != 2 {
|
if len(pair) != 2 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
glbEnvs[kv[0]] = kv[1]
|
glbEnvs[pair[0]] = pair[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user