From 06538504f8ac71f8d11f7e5598ffd13cff9adaa9 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 9 Jan 2024 16:28:10 +0100 Subject: [PATCH] fix regression: save env into configEnv introduced by #3137 --- pipeline/backend/docker/convert.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pipeline/backend/docker/convert.go b/pipeline/backend/docker/convert.go index b7eb3df25..b67e1693b 100644 --- a/pipeline/backend/docker/convert.go +++ b/pipeline/backend/docker/convert.go @@ -39,20 +39,20 @@ func (e *docker) toConfig(step *types.Step) *container.Config { AttachStdout: true, AttachStderr: true, } - env := make(map[string]string) - maps.Copy(env, step.Environment) + configEnv := make(map[string]string) + maps.Copy(configEnv, step.Environment) if len(step.Commands) != 0 { env, entry, cmd := common.GenerateContainerConf(step.Commands, e.info.OSType) for k, v := range env { - env[k] = v + configEnv[k] = v } config.Entrypoint = entry config.Cmd = cmd } - if len(env) != 0 { - config.Env = toEnv(env) + if len(configEnv) != 0 { + config.Env = toEnv(configEnv) } if len(step.Volumes) != 0 { config.Volumes = toVol(step.Volumes)