From ae614920bfe2510ca6d1dd6cea02bbe17ddb245c Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Sat, 21 Mar 2020 14:29:30 -0500 Subject: podmanv2 volumes add volume commands: create, inspect, ls, prune, and rm Signed-off-by: Brent Baude --- pkg/adapter/runtime.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'pkg/adapter') diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go index dfe6b7f07..7817a1f98 100644 --- a/pkg/adapter/runtime.go +++ b/pkg/adapter/runtime.go @@ -347,7 +347,23 @@ func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, opti // PruneVolumes is a wrapper function for libpod PruneVolumes func (r *LocalRuntime) PruneVolumes(ctx context.Context) ([]string, []error) { - return r.Runtime.PruneVolumes(ctx) + var ( + vids []string + errs []error + ) + reports, err := r.Runtime.PruneVolumes(ctx) + if err != nil { + errs = append(errs, err) + return vids, errs + } + for _, r := range reports { + if r.Err == nil { + vids = append(vids, r.Id) + } else { + errs = append(errs, r.Err) + } + } + return vids, errs } // SaveImage is a wrapper function for saving an image to the local filesystem -- cgit v1.2.3-54-g00ecf