summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/funcs.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-03 11:30:51 +0200
committerGitHub <noreply@github.com>2019-05-03 11:30:51 +0200
commita7809fabe508e26c527490e700a1703ef923bd3b (patch)
tree2c3e83fa62f6b98b394123d1c73e321e40041c95 /cmd/podman/shared/funcs.go
parent4877e6a947beff12f7f927978f04cffc11377007 (diff)
parenta477a8ff755e2807d0745b207d6a5bf57de58e4c (diff)
downloadpodman-a7809fabe508e26c527490e700a1703ef923bd3b.tar.gz
podman-a7809fabe508e26c527490e700a1703ef923bd3b.tar.bz2
podman-a7809fabe508e26c527490e700a1703ef923bd3b.zip
Merge pull request #2905 from QiWang19/globalvar
Add variable for global flags to runlabel
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
}