Minimize code duplication for environment variables; ref pterodactyl/panel#2255

This commit is contained in:
Dane Everitt
2020-08-27 20:28:29 -07:00
parent 60acee2df5
commit 711ee2258c
5 changed files with 10 additions and 43 deletions

View File

@@ -103,9 +103,8 @@ func FromConfiguration(data *api.ServerConfigurationResponse) (*Server, error) {
// Right now we only support a Docker based environment, so I'm going to hard code
// this logic in. When we're ready to support other environment we'll need to make
// some modifications here obviously.
envCfg := environment.NewConfiguration(s.Mounts(), s.cfg.Allocations, s.cfg.Build, s.cfg.EnvVars)
envCfg := environment.NewConfiguration(s.Mounts(), s.cfg.Allocations, s.cfg.Build, s.GetEnvironmentVariables())
meta := docker.Metadata{
Invocation: s.Config().Invocation,
Image: s.Config().Container.Image,
}