From c730fe8db79da0623b6ba46fbae1ac4c6c962880 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 ac98a3fca05..36d0d28bb47 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