diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index 7ad24e005e..d036917015 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -128,6 +128,10 @@ func confirmationMessage(options pruneOptions) string { if options.pruneBuildCache { warnings = append(warnings, "all build cache") } + if len(options.filter.String()) > 0 { + warnings = append(warnings, "Elements to be pruned will be filtered with:") + warnings = append(warnings, "label="+options.filter.String()) + } var buffer bytes.Buffer t.Execute(&buffer, &warnings)