allow empty lines

This commit is contained in:
Timon Ringwald 2022-08-04 17:04:00 +02:00
parent f639651970
commit da57f36193

View File

@ -67,7 +67,7 @@ func parseEnvFile(r io.Reader) []string {
if len(matches) != 0 {
key, value := matches[1], os.ExpandEnv(matches[2])
env = append(env, fmt.Sprintf("%s=%s", key, value))
} else if !EnvCommentRegex.MatchString(s.Text()) {
} else if s.Text() != "" && !EnvCommentRegex.MatchString(s.Text()) {
panic(fmt.Sprintf("invalid env syntax on line %d", l))
}
}