summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-05-24 10:41:56 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-25 15:32:47 +0000
commitde13777e71c73cca85c1a69d69da27299be9a269 (patch)
treede8ca5ee39762d8ba2eeacd215921a91745859f3 /libpod/container_inspect.go
parentc8b72e57a75262c0edeea839e9e34bb0c3e03d13 (diff)
downloadpodman-de13777e71c73cca85c1a69d69da27299be9a269.tar.gz
podman-de13777e71c73cca85c1a69d69da27299be9a269.tar.bz2
podman-de13777e71c73cca85c1a69d69da27299be9a269.zip
Make references to the Process part of Spec conditional
The OCI runtime spec does not require Process to be passed (IE, it can be nil). Make most of our references to it conditional on it existing. Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #828 Approved by: mheon
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index 6b62a3f44..c8bf1a8cd 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -13,7 +13,11 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
runtimeInfo := c.state
spec := c.config.Spec
- args := config.Spec.Process.Args
+ // Process is allowed to be nil in the spec
+ args := []string{}
+ if config.Spec.Process != nil {
+ args = config.Spec.Process.Args
+ }
var path string
if len(args) > 0 {
path = args[0]