summaryrefslogtreecommitdiff
path: root/cmd/podman/ps.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/ps.go')
-rw-r--r--cmd/podman/ps.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 0ad511217..3b53fe6f1 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -522,9 +522,10 @@ func getTemplateOutput(psParams []psJSONParams, opts shared.PsOptions) ([]psTemp
}
if opts.Size {
if psParam.Size == nil {
- return nil, errors.Errorf("Container %s does not have a size struct", psParam.ID)
+ size = units.HumanSizeWithPrecision(0, 0)
+ } else {
+ size = units.HumanSizeWithPrecision(float64(psParam.Size.RwSize), 3) + " (virtual " + units.HumanSizeWithPrecision(float64(psParam.Size.RootFsSize), 3) + ")"
}
- size = units.HumanSizeWithPrecision(float64(psParam.Size.RwSize), 3) + " (virtual " + units.HumanSizeWithPrecision(float64(psParam.Size.RootFsSize), 3) + ")"
}
if opts.Pod {
pod = psParam.Pod