summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/parse
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-03 14:18:28 +0100
committerGitHub <noreply@github.com>2020-03-03 14:18:28 +0100
commit34baea814ba6af58e7f7b65622fd0fb7b838fbf7 (patch)
tree0ac13e0869ade22faf212a0cf2602ac832d90820 /cmd/podman/shared/parse
parent1641ee61802ad5e13a9ddf0a20099fe31f73768d (diff)
parentad8e0e5e49a96146d52cfa41945afbe973ba30af (diff)
downloadpodman-34baea814ba6af58e7f7b65622fd0fb7b838fbf7.tar.gz
podman-34baea814ba6af58e7f7b65622fd0fb7b838fbf7.tar.bz2
podman-34baea814ba6af58e7f7b65622fd0fb7b838fbf7.zip
Merge pull request #5367 from vrothberg/ENVFIX
consolidate env handling into pkg/env
Diffstat (limited to 'cmd/podman/shared/parse')
-rw-r--r--cmd/podman/shared/parse/parse.go19
1 files changed, 2 insertions, 17 deletions
diff --git a/cmd/podman/shared/parse/parse.go b/cmd/podman/shared/parse/parse.go
index 79449029d..03cda268c 100644
--- a/cmd/podman/shared/parse/parse.go
+++ b/cmd/podman/shared/parse/parse.go
@@ -90,6 +90,8 @@ func GetAllLabels(labelFile, inputLabels []string) (map[string]string, error) {
// all environment variables, even those sourced from files, but
// that would require a substantial rework.
if err := parseEnvFile(labels, file); err != nil {
+ // FIXME: parseEnvFile is using parseEnv, so we need to add extra
+ // logic for labels.
return nil, err
}
}
@@ -107,23 +109,6 @@ func GetAllLabels(labelFile, inputLabels []string) (map[string]string, error) {
return labels, nil
}
-// reads a file of line terminated key=value pairs, and overrides any keys
-// present in the file with additional pairs specified in the override parameter
-// for env-file and labels-file flags
-func ReadKVStrings(env map[string]string, files []string, override []string) error {
- for _, ef := range files {
- if err := parseEnvFile(env, ef); err != nil {
- return err
- }
- }
- for _, line := range override {
- if err := parseEnv(env, line); err != nil {
- return err
- }
- }
- return nil
-}
-
func parseEnv(env map[string]string, line string) error {
data := strings.SplitN(line, "=", 2)