From 94602a1e8528874e582e42f398d3da50513a0c27 Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 30 Aug 2017 09:24:12 -0500 Subject: [PATCH] cmd/kpod/ps.go: Use getCommand for JSON The getCommand func strips out unwanted characters around the command of the container. The JSON output should use this func like the regular ps output for both consistency and because Python does a literal interpretation of the bracket [] characters when consuming as JSON. Signed-off-by: baude --- cmd/kpod/ps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kpod/ps.go b/cmd/kpod/ps.go index ad2f1989..aef86b6c 100644 --- a/cmd/kpod/ps.go +++ b/cmd/kpod/ps.go @@ -298,7 +298,7 @@ func getJSONOutput(containers []*libkpod.ContainerData) (psOutput []psJSONParams ID: ctr.ID, Image: ctr.FromImage, ImageID: ctr.FromImageID, - Command: ctr.ImageCreatedBy, + Command: getCommand(ctr.ImageCreatedBy), CreatedAt: ctr.State.Created, RunningFor: time.Since(ctr.State.Created), Status: ctr.State.Status,