From 3ce32f15595d66884c42a35fc0fc994cf51eaf70 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 21 Apr 2016 17:08:47 -0700 Subject: [PATCH] Fix splitting on equals to return maximum of two strings --- client/driver/env/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/driver/env/env.go b/client/driver/env/env.go index ac98a3fca..36d0d28bb 100644 --- a/client/driver/env/env.go +++ b/client/driver/env/env.go @@ -354,7 +354,7 @@ func (t *TaskEnvironment) AppendHostEnvvars(filter []string) *TaskEnvironment { } for _, e := range hostEnv { - parts := strings.Split(e, "=") + parts := strings.SplitN(e, "=", 2) key, value := parts[0], parts[1] // Skip filtered environment variables