More logical environment variable checking

This commit is contained in:
Dane Everitt 2019-11-24 20:59:40 -08:00
parent c684410722
commit a8c16debfb
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -635,9 +635,12 @@ func (d *DockerEnvironment) environmentVariables() []string {
fmt.Sprintf("SERVER_PORT=%d", d.Server.Allocations.DefaultMapping.Port), fmt.Sprintf("SERVER_PORT=%d", d.Server.Allocations.DefaultMapping.Port),
} }
eloop:
for k, v := range d.Server.EnvVars { for k, v := range d.Server.EnvVars {
if strings.ToUpper(k) == "STARTUP" { for _, e := range out {
continue if strings.HasPrefix(e, strings.ToUpper(k)) {
continue eloop
}
} }
out = append(out, fmt.Sprintf("%s=\"%s\"", strings.ToUpper(k), v)) out = append(out, fmt.Sprintf("%s=\"%s\"", strings.ToUpper(k), v))