summaryrefslogtreecommitdiff
path: root/cmd/podman/runlabel.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2019-04-11 15:59:30 -0400
committerQi Wang <qiwan@redhat.com>2019-05-02 12:14:51 -0400
commita477a8ff755e2807d0745b207d6a5bf57de58e4c (patch)
treea7a6f479c733c42ddc7aca2a30b1c753cf9238bb /cmd/podman/runlabel.go
parent7d05ff3fc772a7be4860ed4a3cd59a62f8bb893a (diff)
downloadpodman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.tar.gz
podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.tar.bz2
podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.zip
Add variable for global flags to runlabel
use $GLOBAL_OPTS to pass global flags to the runlabel command. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman/runlabel.go')
-rw-r--r--cmd/podman/runlabel.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/runlabel.go b/cmd/podman/runlabel.go
index f097cb693..c426817de 100644
--- a/cmd/podman/runlabel.go
+++ b/cmd/podman/runlabel.go
@@ -12,6 +12,7 @@ import (
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/image"
+ "github.com/containers/libpod/pkg/util"
"github.com/containers/libpod/utils"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -145,7 +146,8 @@ func runlabelCmd(c *cliconfig.RunlabelValues) error {
return errors.Errorf("%s does not have a label of %s", runlabelImage, label)
}
- cmd, env, err := shared.GenerateRunlabelCommand(runLabel, imageName, c.Name, opts, extraArgs)
+ globalOpts := util.GetGlobalOpts(c)
+ cmd, env, err := shared.GenerateRunlabelCommand(runLabel, imageName, c.Name, opts, extraArgs, globalOpts)
if err != nil {
return err
}