Update prune.go

Append a warning with which filter the elements will be pruned with if filter is set.

Signed-off-by: Justyn Temme <justyntemme@gmail.com>
This commit is contained in:
Justyn Temme 2018-05-08 08:54:07 -05:00
parent c31b61bff4
commit 7d113de085
1 changed files with 4 additions and 0 deletions

View File

@ -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)