Skip to content

Commit 40340f9

Browse files
author
Michal Minář
committed
minor pretty print change
Signed-off-by: Michal Minář <[email protected]>
1 parent f575e42 commit 40340f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/oc/admin/prune/images.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,10 @@ func (o PruneImagesOptions) Run() error {
479479

480480
func printSummary(out io.Writer, deletions []imageprune.Deletion, failures []imageprune.Failure) {
481481
// TODO: for higher verbosity, sum by error type
482-
fmt.Fprintf(out, "Deleted %d objects out of %d.\n", len(deletions), len(deletions)+len(failures))
483-
if len(failures) > 0 {
482+
if len(failures) == 0 {
483+
fmt.Fprintf(out, "Deleted %d objects.\n", len(deletions))
484+
} else {
485+
fmt.Fprintf(out, "Deleted %d objects out of %d.\n", len(deletions), len(deletions)+len(failures))
484486
fmt.Fprintf(out, "Failed to delete %d objects.\n", len(failures))
485487
}
486488
if !glog.V(2) {

0 commit comments

Comments
 (0)