diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-08 14:42:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-08 14:42:19 +0000 |
commit | d6079debd86861c40f98cf66d6da3208bc5b397a (patch) | |
tree | 7cd73b44bcabdc444228e08b55f1b1f5f1838637 /pkg/domain/infra/abi/containers_runlabel.go | |
parent | 2d88c5f54344c156f121cc435983b109cfe3104c (diff) | |
parent | d7f6f4e8819cca1f5d14194ec685596c198855cf (diff) | |
download | podman-d6079debd86861c40f98cf66d6da3208bc5b397a.tar.gz podman-d6079debd86861c40f98cf66d6da3208bc5b397a.tar.bz2 podman-d6079debd86861c40f98cf66d6da3208bc5b397a.zip |
Merge pull request #12529 from vrothberg/fix-12436
remove runlabel test for global opts
Diffstat (limited to 'pkg/domain/infra/abi/containers_runlabel.go')
-rw-r--r-- | pkg/domain/infra/abi/containers_runlabel.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go index b0aae4b76..716e77716 100644 --- a/pkg/domain/infra/abi/containers_runlabel.go +++ b/pkg/domain/infra/abi/containers_runlabel.go @@ -111,7 +111,6 @@ func generateRunlabelCommand(runlabel string, img *libimage.Image, inputName str var ( err error name, imageName string - globalOpts string cmd []string ) @@ -144,7 +143,7 @@ func generateRunlabelCommand(runlabel string, img *libimage.Image, inputName str runlabel = fmt.Sprintf("%s %s", runlabel, strings.Join(args, " ")) } - cmd, err = generateCommand(runlabel, imageName, name, globalOpts) + cmd, err = generateCommand(runlabel, imageName, name) if err != nil { return nil, nil, err } @@ -209,7 +208,7 @@ func replaceImage(arg, image string) string { } // generateCommand takes a label (string) and converts it to an executable command -func generateCommand(command, imageName, name, globalOpts string) ([]string, error) { +func generateCommand(command, imageName, name string) ([]string, error) { if name == "" { name = imageName } @@ -231,8 +230,6 @@ func generateCommand(command, imageName, name, globalOpts string) ([]string, err newArg = fmt.Sprintf("IMAGE=%s", imageName) case "NAME=NAME": newArg = fmt.Sprintf("NAME=%s", name) - case "$GLOBAL_OPTS": - newArg = globalOpts default: newArg = replaceName(arg, name) newArg = replaceImage(newArg, imageName) |