mirror of https://github.com/docker/cli.git
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:
commit
b175e3aacd
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue