Skip to content

Commit 662f2c3

Browse files
authoredJan 5, 2021
Merge pull request #10092 from afbjorklund/podman-debian
Handle podman installations without default bridge
2 parents 65f7a71 + f22a380 commit 662f2c3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎pkg/drivers/kic/oci/network_create.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,13 @@ func podmanNetworkInspect(name string) (netInfo, error) {
221221
return info, err
222222
}
223223

224+
output := rr.Stdout.String()
225+
if output == "" {
226+
return info, fmt.Errorf("no bridge network found for %s", name)
227+
}
228+
224229
// results looks like 172.17.0.0/16,172.17.0.1,1500
225-
vals := strings.Split(strings.TrimSpace(rr.Stdout.String()), ",")
230+
vals := strings.Split(strings.TrimSpace(output), ",")
226231
if len(vals) == 0 {
227232
return info, fmt.Errorf("empty list network inspect: %q", rr.Output())
228233
}

0 commit comments

Comments
 (0)
Please sign in to comment.