Skip to content

Commit

Permalink
length check envParts
Browse files Browse the repository at this point in the history
Signed-off-by: Tiger Kaovilai <[email protected]>
  • Loading branch information
kaovilai committed Feb 13, 2024
1 parent 40ab3bc commit b14f5fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/distribution/configuration/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func NewParser(prefix string, envs []string, parseInfos []configuration.Versione

for _, env := range envs {
envParts := strings.SplitN(env, "=", 2)
if len(envParts) < 2 {
continue
}
p.env = append(p.env, envVar{envParts[0], envParts[1]})
}

Expand Down

0 comments on commit b14f5fc

Please sign in to comment.