From 3e0b7fbd46c048e1b945ab5b67046e26f49a8f40 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Tue, 5 Dec 2017 23:57:43 +0100 Subject: [PATCH] fix: split env vars into only two parts The loadEnv() function was splitting env vars on all `=` characters which is not correct. Env vars are `key=val` and contain only two parts. --- pipeline/build/ldflags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/build/ldflags.go b/pipeline/build/ldflags.go index 527e96c6a..dc98ef06d 100644 --- a/pipeline/build/ldflags.go +++ b/pipeline/build/ldflags.go @@ -39,7 +39,7 @@ func ldflags(ctx *context.Context, build config.Build) (string, error) { func loadEnvs() map[string]string { r := map[string]string{} for _, e := range os.Environ() { - env := strings.Split(e, "=") + env := strings.SplitN(e, "=", 2) r[env[0]] = env[1] } return r