Merge pull request #1043 from justyntemme/patch-2

Fix issue #850, Warn user of filter when pruning
This commit is contained in:
Sebastiaan van Stijn 2018-05-22 00:26:26 +02:00 committed by GitHub
commit 680c5790d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -128,6 +128,10 @@ func confirmationMessage(options pruneOptions) string {
if options.pruneBuildCache { if options.pruneBuildCache {
warnings = append(warnings, "all build cache") 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 var buffer bytes.Buffer
t.Execute(&buffer, &warnings) t.Execute(&buffer, &warnings)