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:
parent
7f9fbb8eea
commit
427aa1ee2e
1 changed files with 4 additions and 0 deletions
4
main.go
4
main.go
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue