aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/shared/funcs.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/shared/funcs.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/shared/funcs.go')
-rw-r--r--cmd/podman/shared/funcs.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/shared/funcs.go b/cmd/podman/shared/funcs.go
index 70d041fd2..c189cceeb 100644
--- a/cmd/podman/shared/funcs.go
+++ b/cmd/podman/shared/funcs.go
@@ -41,7 +41,7 @@ func substituteCommand(cmd string) (string, error) {
}
// GenerateCommand takes a label (string) and converts it to an executable command
-func GenerateCommand(command, imageName, name string) ([]string, error) {
+func GenerateCommand(command, imageName, name, globalOpts string) ([]string, error) {
var (
newCommand []string
)
@@ -79,6 +79,8 @@ func GenerateCommand(command, imageName, name string) ([]string, error) {
newArg = fmt.Sprintf("NAME=%s", name)
case "$NAME":
newArg = name
+ case "$GLOBAL_OPTS":
+ newArg = globalOpts
default:
newArg = arg
}