mirror of
https://github.com/containers/podman.git
synced 2025-07-27 02:12:48 +08:00
Fix system prune output message
'podman system prune' command always outputs "Deleted Images" message, even though there is no dangling or unused image to remove. This message should be output only if dangling or unused image exists. [NO NEW TESTS NEEDED] Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
@ -44,7 +44,7 @@ func PrintPodPruneResults(podPruneReports []*entities.PodPruneReport, heading bo
|
|||||||
|
|
||||||
func PrintContainerPruneResults(containerPruneReports []*reports.PruneReport, heading bool) error {
|
func PrintContainerPruneResults(containerPruneReports []*reports.PruneReport, heading bool) error {
|
||||||
var errs OutputErrors
|
var errs OutputErrors
|
||||||
if heading && (len(containerPruneReports) > 0) {
|
if heading && len(containerPruneReports) > 0 {
|
||||||
fmt.Println("Deleted Containers")
|
fmt.Println("Deleted Containers")
|
||||||
}
|
}
|
||||||
for _, v := range containerPruneReports {
|
for _, v := range containerPruneReports {
|
||||||
@ -72,7 +72,7 @@ func PrintVolumePruneResults(volumePruneReport []*reports.PruneReport, heading b
|
|||||||
}
|
}
|
||||||
|
|
||||||
func PrintImagePruneResults(imagePruneReports []*reports.PruneReport, heading bool) error {
|
func PrintImagePruneResults(imagePruneReports []*reports.PruneReport, heading bool) error {
|
||||||
if heading {
|
if heading && len(imagePruneReports) > 0 {
|
||||||
fmt.Println("Deleted Images")
|
fmt.Println("Deleted Images")
|
||||||
}
|
}
|
||||||
for _, r := range imagePruneReports {
|
for _, r := range imagePruneReports {
|
||||||
|
Reference in New Issue
Block a user