From 7d113de085dcd1855c01c73ddcaa58ca4eb51c7d Mon Sep 17 00:00:00 2001 From: Justyn Temme Date: Tue, 8 May 2018 08:54:07 -0500 Subject: [PATCH] Update prune.go Append a warning with which filter the elements will be pruned with if filter is set. Signed-off-by: Justyn Temme --- cli/command/system/prune.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index e777501d89..5409e62268 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)