aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pod_create.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-02-14 15:46:18 -0500
committerMatthew Heon <matthew.heon@pm.me>2020-02-14 16:06:20 -0500
commit36a0ed9702bf4e6ef50650404c838a26f13ba879 (patch)
tree316a75c4cc66f02fed91cb40918e6396b314bc54 /cmd/podman/pod_create.go
parent97fdfd0a80b14b83abca3d8e0aa1b5c64ceac79b (diff)
downloadpodman-36a0ed9702bf4e6ef50650404c838a26f13ba879.tar.gz
podman-36a0ed9702bf4e6ef50650404c838a26f13ba879.tar.bz2
podman-36a0ed9702bf4e6ef50650404c838a26f13ba879.zip
Rework label parsing
We attempted to share all logic for parsing labels and environment variables, which on the surface makes lots of sense (both are formatted key=value so parsing logic should be identical) but has begun to fall apart now that we have added additional logic to environment variable handling. Environment variables that are unset, for example, are looked up against environment variables set for the process. We don't want this for labels, so we have to split parsing logic. Fixes #3854 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/pod_create.go')
-rw-r--r--cmd/podman/pod_create.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/pod_create.go b/cmd/podman/pod_create.go
index cee6476ea..0f72780f9 100644
--- a/cmd/podman/pod_create.go
+++ b/cmd/podman/pod_create.go
@@ -6,6 +6,7 @@ import (
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
+ "github.com/containers/libpod/cmd/podman/shared/parse"
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/adapter"
"github.com/containers/libpod/pkg/errorhandling"
@@ -103,7 +104,7 @@ func podCreateCmd(c *cliconfig.PodCreateValues) error {
defer errorhandling.SyncQuiet(podIdFile)
}
- labels, err := shared.GetAllLabels(c.LabelFile, c.Labels)
+ labels, err := parse.GetAllLabels(c.LabelFile, c.Labels)
if err != nil {
return errors.Wrapf(err, "unable to process labels")
}