mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Fix --filter=desired_state behaviour
Just like `docker service tasks`, we should add `desired_state` filters only in case there is no provided filters. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@@ -55,7 +55,7 @@ func runTasks(dockerCli *client.DockerCli, opts tasksOptions) error {
|
||||
|
||||
filter := opts.filter.Value()
|
||||
filter.Add("node", node.ID)
|
||||
if !opts.all {
|
||||
if !opts.all && !filter.Include("desired_state") {
|
||||
filter.Add("desired_state", string(swarm.TaskStateRunning))
|
||||
filter.Add("desired_state", string(swarm.TaskStateAccepted))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user