diff options
Diffstat (limited to 'cmd/podman/networks/prune.go')
-rw-r--r-- | cmd/podman/networks/prune.go | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/cmd/podman/networks/prune.go b/cmd/podman/networks/prune.go index fa621ebac..ee5389aa7 100644 --- a/cmd/podman/networks/prune.go +++ b/cmd/podman/networks/prune.go @@ -52,10 +52,7 @@ func init() { } func networkPrune(cmd *cobra.Command, _ []string) error { - var ( - errs utils.OutputErrors - err error - ) + var err error if !force { reader := bufio.NewReader(os.Stdin) fmt.Println("WARNING! This will remove all networks not used by at least one container.") @@ -77,13 +74,5 @@ func networkPrune(cmd *cobra.Command, _ []string) error { setExitCode(err) return err } - for _, r := range responses { - if r.Error == nil { - fmt.Println(r.Name) - } else { - setExitCode(r.Error) - errs = append(errs, r.Error) - } - } - return errs.PrintErrors() + return utils.PrintNetworkPruneResults(responses, false) } |