summaryrefslogtreecommitdiff
path: root/vendor/github.com/openshift/imagebuilder/builder.go
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2020-06-17 15:32:12 -0400
committerTomSweeneyRedHat <tsweeney@redhat.com>2020-06-17 15:32:22 -0400
commitfde8040faabbaf6eac24a28a60631cd4b3337e91 (patch)
treeeed5fe6373c7c2d4d82672f521f52185121577e8 /vendor/github.com/openshift/imagebuilder/builder.go
parentfd184fa4a1d0bd7797de1fb062c90e1a6d56bd1e (diff)
downloadpodman-fde8040faabbaf6eac24a28a60631cd4b3337e91.tar.gz
podman-fde8040faabbaf6eac24a28a60631cd4b3337e91.tar.bz2
podman-fde8040faabbaf6eac24a28a60631cd4b3337e91.zip
Bump Buildah to v1.15.0
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'vendor/github.com/openshift/imagebuilder/builder.go')
-rw-r--r--vendor/github.com/openshift/imagebuilder/builder.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/vendor/github.com/openshift/imagebuilder/builder.go b/vendor/github.com/openshift/imagebuilder/builder.go
index 7f2f6e482..ffc3b257f 100644
--- a/vendor/github.com/openshift/imagebuilder/builder.go
+++ b/vendor/github.com/openshift/imagebuilder/builder.go
@@ -332,10 +332,19 @@ func ParseFile(path string) (*parser.Node, error) {
// Step creates a new step from the current state.
func (b *Builder) Step() *Step {
- dst := make([]string, len(b.Env)+len(b.RunConfig.Env))
- copy(dst, b.Env)
+ argsMap := make(map[string]string)
+ for _, argsVal := range b.Arguments() {
+ val := strings.Split(argsVal, "=")
+ if len(val) > 1 {
+ argsMap[val[0]] = val[1]
+ }
+ }
+
+ userArgs := makeUserArgs(b.Env, argsMap)
+ dst := make([]string, len(userArgs)+len(b.RunConfig.Env))
+ copy(dst, userArgs)
dst = append(dst, b.RunConfig.Env...)
- dst = append(dst, b.Arguments()...)
+
return &Step{Env: dst}
}