More logical environment variable checking
This commit is contained in:
parent
c684410722
commit
a8c16debfb
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user