Merge pull request #311 from thaJeztah/fix-system-prune-until

Error if "until" filter is combined with "--volumes" on system prune
This commit is contained in:
Sebastiaan van Stijn 2017-07-22 03:04:58 +02:00 committed by GitHub
commit b175e3aacd
1 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,10 @@ func runBuildCachePrune(dockerCli command.Cli, _ opts.FilterOpt) (uint64, string
} }
func runPrune(dockerCli command.Cli, options pruneOptions) error { 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 versions.LessThan(dockerCli.Client().ClientVersion(), "1.31") { if versions.LessThan(dockerCli.Client().ClientVersion(), "1.31") {
options.pruneBuildCache = false options.pruneBuildCache = false
} }