Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[17.06] Error if "until" filter is combined with "--volumes" on system prune #154

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/cli/cli/command/system/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down