summaryrefslogtreecommitdiff
path: root/pkg/adapter/runtime.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-24 23:20:25 +0100
committerGitHub <noreply@github.com>2020-03-24 23:20:25 +0100
commitb4520649af59780df494d75f50d0b5081eafff04 (patch)
tree5edd6e5fd01f12154c82146ce6170aaf7d716e19 /pkg/adapter/runtime.go
parent0c084d9719772a9b68d5eb67114cf5bf001958b2 (diff)
parentae614920bfe2510ca6d1dd6cea02bbe17ddb245c (diff)
downloadpodman-b4520649af59780df494d75f50d0b5081eafff04.tar.gz
podman-b4520649af59780df494d75f50d0b5081eafff04.tar.bz2
podman-b4520649af59780df494d75f50d0b5081eafff04.zip
Merge pull request #5593 from baude/v2volumes
podmanv2 volumes
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r--pkg/adapter/runtime.go18
1 files changed, 17 insertions, 1 deletions
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