1
0
Fork 0
mirror of https://github.com/Luzifer/envrun.git synced 2024-12-20 18:31:17 +00:00

Fix: Panic on invalid entries in env-file

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-02-13 21:48:20 +01:00
parent 7f9fbb8eea
commit 427aa1ee2e
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -57,6 +57,10 @@ func envListToMap(list []string) map[string]string {
} }
parts := strings.SplitN(entry, "=", 2) parts := strings.SplitN(entry, "=", 2)
if len(parts) != 2 {
log.WithField("entry", entry).Warn("Invalid env-file entry")
continue
}
out[parts[0]] = parts[1] out[parts[0]] = parts[1]
} }
return out return out