From a8c16debfb2aa61de8afac5495fefd2db8f6af3c Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 24 Nov 2019 20:59:40 -0800 Subject: [PATCH] More logical environment variable checking --- server/environment_docker.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/environment_docker.go b/server/environment_docker.go index 5aee9d5..f489f86 100644 --- a/server/environment_docker.go +++ b/server/environment_docker.go @@ -635,9 +635,12 @@ func (d *DockerEnvironment) environmentVariables() []string { fmt.Sprintf("SERVER_PORT=%d", d.Server.Allocations.DefaultMapping.Port), } + eloop: for k, v := range d.Server.EnvVars { - if strings.ToUpper(k) == "STARTUP" { - continue + for _, e := range out { + if strings.HasPrefix(e, strings.ToUpper(k)) { + continue eloop + } } out = append(out, fmt.Sprintf("%s=\"%s\"", strings.ToUpper(k), v))