docker / libcompose

*Unmaintained/Deprecated* An experimental go library providing Compose-like functionality
https://godoc.org/github.com/docker/libcompose
Apache License 2.0
585 stars 191 forks source link

serviceConfig.Environment.ToMap() doesn't support environment variables containing equals signs ("=") #454

Closed jritsema closed 7 years ago

jritsema commented 7 years ago

Similar to this issue, the Environment.ToMap() API isn't able to parse equals signs (=). For example:

version: "2"
services:
  container:
    image: helloworld
    environment:
      CHAR_EQUAL: =foo=bar=
serviceConfig, success := project.GetServiceConfig("container")
if !success {
  log.Fatal("fail")
}
for key, value := range serviceConfig.Environment.ToMap() {
  //value is empty
  log.Printf("%v = %v", key, value)
}