Merge pull request #154 from thaJeztah/17.06-backport-prune-until-filter

[17.06] Error if "until" filter is combined with "--volumes" on system prune
This commit is contained in:
Andrew Hsu
2017-08-01 19:11:04 -07:00
committed by GitHub

View File

@ -52,6 +52,10 @@ const confirmationTemplate = `WARNING! This will remove:
Are you sure you want to continue?`
func runPrune(dockerCli command.Cli, options pruneOptions) error {
// TODO version this once "until" filter is supported for volumes
if options.pruneVolumes && options.filter.Value().Include("until") {
return fmt.Errorf(`ERROR: The "until" filter is not supported with "--volumes"`)
}
if !options.force && !command.PromptForConfirmation(dockerCli.In(), dockerCli.Out(), confirmationMessage(options)) {
return nil
}