Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables with multiple '=' are not parsed correctly #278

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions integration/dockerfiles/Dockerfile_test_env
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0
ENV hey hey
ENV PATH /usr/local
ENV testmultipleeq="this=is a=test string=with a=lot of=equals"
ENV hey hello
ENV first=foo second=foo2
ENV third $second:/third
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/command_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func UpdateConfigEnv(newEnvs []instructions.KeyValuePair, config *v1.Config, rep
// First, convert config.Env array to []instruction.KeyValuePair
var kvps []instructions.KeyValuePair
for _, env := range config.Env {
entry := strings.Split(env, "=")
entry := strings.SplitN(env, "=", 2)
kvps = append(kvps, instructions.KeyValuePair{
Key: entry[0],
Value: entry[1],
Expand Down