Skip to content

Commit

Permalink
NetworkList to NetworkInspect for ID search
Browse files Browse the repository at this point in the history
Signed-off-by: kimdcottrell <me@kimdcottrell.com>
  • Loading branch information
kimdcottrell committed Oct 20, 2023
1 parent bc10b20 commit 8db86d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,9 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne
}

if len(networks) == 0 {
networks, err = s.apiClient().NetworkList(ctx, moby.NetworkListOptions{
Filters: filters.NewArgs(filters.Arg("id", n.Name)),
})
// in this instance, n.Name is really an ID
network, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
networks = append(networks, network)
if err != nil {
return err
}

Check warning on line 1138 in pkg/compose/create.go

View check run for this annotation

Codecov / codecov/patch

pkg/compose/create.go#L1132-L1138

Added lines #L1132 - L1138 were not covered by tests
Expand Down

0 comments on commit 8db86d8

Please sign in to comment.