diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2020-10-23 08:18:13 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-10-23 06:52:53 -0400 |
commit | 22b1d10d31dfa31da14171c4eebd599dcd4523fc (patch) | |
tree | 1d6ad6eb695521e840239e24a879d8be36d5faaa /vendor/github.com/openshift/imagebuilder/dispatchers.go | |
parent | 2adc1b284d7f61083d19e82822f79ea14c14de2d (diff) | |
download | podman-22b1d10d31dfa31da14171c4eebd599dcd4523fc.tar.gz podman-22b1d10d31dfa31da14171c4eebd599dcd4523fc.tar.bz2 podman-22b1d10d31dfa31da14171c4eebd599dcd4523fc.zip |
Bump github.com/containers/buildah from 1.16.4 to 1.16.5
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.16.4 to 1.16.5.
- [Release notes](https://github.com/containers/buildah/releases)
- [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md)
- [Commits](https://github.com/containers/buildah/compare/v1.16.4...v1.16.5)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/openshift/imagebuilder/dispatchers.go')
-rw-r--r-- | vendor/github.com/openshift/imagebuilder/dispatchers.go | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/vendor/github.com/openshift/imagebuilder/dispatchers.go b/vendor/github.com/openshift/imagebuilder/dispatchers.go index 3a350fbee..ea3df04d3 100644 --- a/vendor/github.com/openshift/imagebuilder/dispatchers.go +++ b/vendor/github.com/openshift/imagebuilder/dispatchers.go @@ -83,21 +83,9 @@ func env(b *Builder, args []string, attributes map[string]bool, flagArgs []strin for j := 0; j < len(args); j++ { // name ==> args[j] // value ==> args[j+1] - newVar := args[j] + "=" + args[j+1] + "" - gotOne := false - for i, envVar := range b.RunConfig.Env { - envParts := strings.SplitN(envVar, "=", 2) - if envParts[0] == args[j] { - b.RunConfig.Env[i] = newVar - b.Env = append([]string{newVar}, b.Env...) - gotOne = true - break - } - } - if !gotOne { - b.RunConfig.Env = append(b.RunConfig.Env, newVar) - b.Env = append([]string{newVar}, b.Env...) - } + newVar := []string{args[j] + "=" + args[j+1]} + b.RunConfig.Env = mergeEnv(b.RunConfig.Env, newVar) + b.Env = mergeEnv(b.Env, newVar) j++ } @@ -153,7 +141,7 @@ func add(b *Builder, args []string, attributes map[string]bool, flagArgs []strin var chown string last := len(args) - 1 dest := makeAbsolute(args[last], b.RunConfig.WorkingDir) - userArgs := makeUserArgs(b.Env, b.Args) + userArgs := mergeEnv(envMapAsSlice(b.Args), b.Env) for _, a := range flagArgs { arg, err := ProcessWord(a, userArgs) if err != nil { @@ -182,7 +170,7 @@ func dispatchCopy(b *Builder, args []string, attributes map[string]bool, flagArg dest := makeAbsolute(args[last], b.RunConfig.WorkingDir) var chown string var from string - userArgs := makeUserArgs(b.Env, b.Args) + userArgs := mergeEnv(envMapAsSlice(b.Args), b.Env) for _, a := range flagArgs { arg, err := ProcessWord(a, userArgs) if err != nil { |