summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-14 19:31:02 +0200
committerGitHub <noreply@github.com>2019-06-14 19:31:02 +0200
commit4c849a79ead9447826af650f1511a2ae9c42b50a (patch)
tree67e30106984e245bd7337df218e2e5af456ff26e /pkg
parent1ac8307ae40927b5933e4f84870197ac07a21f46 (diff)
parentd2d57517d7d2a0f3ccbdf4bff4e7a9a24dd1f4fb (diff)
downloadpodman-4c849a79ead9447826af650f1511a2ae9c42b50a.tar.gz
podman-4c849a79ead9447826af650f1511a2ae9c42b50a.tar.bz2
podman-4c849a79ead9447826af650f1511a2ae9c42b50a.zip
Merge pull request #3333 from jordemort/podman-commit-env-fix
Fix ENV parsing on `podman import`
Diffstat (limited to 'pkg')
-rw-r--r--pkg/util/utils.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index a074f276c..61cdbbf38 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -99,7 +99,10 @@ func GetImageConfig(changes []string) (v1.ImageConfig, error) {
var st struct{}
exposedPorts[pair[1]] = st
case "ENV":
- env = append(env, pair[1])
+ if len(pair) < 3 {
+ return v1.ImageConfig{}, errors.Errorf("no value given for environment variable %q", pair[1])
+ }
+ env = append(env, strings.Join(pair[1:], "="))
case "ENTRYPOINT":
entrypoint = append(entrypoint, pair[1])
case "CMD":