Skip to content

Commit 6f1731e

Browse files
committed
fix(agent/agentcontainers): exit early if there are no container IDs
1 parent fcce2be commit 6f1731e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

agent/agentcontainers/containers_dockercli.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ func (dcl *DockerCLILister) List(ctx context.Context) (codersdk.WorkspaceAgentLi
5959
}
6060

6161
dockerPsStderr := strings.TrimSpace(stderrBuf.String())
62+
if len(ids) == 0 {
63+
return codersdk.WorkspaceAgentListContainersResponse{
64+
Warnings: []string{dockerPsStderr},
65+
}, nil
66+
}
6267

6368
// now we can get the detailed information for each container
6469
// Run `docker inspect` on each container ID

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy