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:
parent
3d231c78e8
commit
3c194bd2a4
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue