Skip to content

Commit c276c8d

Browse files
lvan100lianghuan
authored andcommitted
fix(env): Fix crashes caused by empty environment variable keys
1 parent dc7b896 commit c276c8d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gs/internal/gs_conf/env.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ func (c *Environment) CopyTo(p *conf.MutableProperties) error {
4545
if len(ss) > 1 {
4646
v = ss[1]
4747
}
48+
if k == "" { // e.g., =::=::
49+
continue
50+
}
4851
var propKey string
4952
if strings.HasPrefix(k, prefix) {
5053
propKey = strings.TrimPrefix(k, prefix)

0 commit comments

Comments
 (0)