aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-09-16 11:39:07 -0400
committerCharlie Doern <cdoern@redhat.com>2022-09-16 11:43:26 -0400
commit049b1088456cb34a3f3b012e3d228ca154a796c5 (patch)
treeea8b5343ad52395e6d653abd382df5640c00446e /pkg
parent8f76bc2d739657cf4394cb4d08f314011ba08dab (diff)
downloadpodman-049b1088456cb34a3f3b012e3d228ca154a796c5.tar.gz
podman-049b1088456cb34a3f3b012e3d228ca154a796c5.tar.bz2
podman-049b1088456cb34a3f3b012e3d228ca154a796c5.zip
podman container clone env patch
podman container clone was failing when env variables had multiple `=` in them. Switch split to splitn resolves #15836 Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/container.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go
index c18b5654a..736fa5ab3 100644
--- a/pkg/specgen/generate/container.go
+++ b/pkg/specgen/generate/container.go
@@ -352,7 +352,7 @@ func ConfigToSpec(rt *libpod.Runtime, specg *specgen.SpecGenerator, contaierID s
if conf.Spec.Process != nil && conf.Spec.Process.Env != nil {
env := make(map[string]string)
for _, entry := range conf.Spec.Process.Env {
- split := strings.Split(entry, "=")
+ split := strings.SplitN(entry, "=", 2)
if len(split) == 2 {
env[split[0]] = split[1]
}