Skip to content

Commit 0469999

Browse files
authored
fix: return an error if custom bridge name is not set successfully (runfinch#100)
Signed-off-by: Swagat Bora <[email protected]>
1 parent 9cc615a commit 0469999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/service/network/driver/bridge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (bd *bridgeDriver) HandlePostCreate(net *netutil.NetworkConfig) (string, er
9292
// Since nerdctl currently does not support custom bridge names,
9393
// we explicitly override bridge name in the conflist file for the network that was just created
9494
if err = bd.setBridgeName(net, bridgeName); err != nil {
95-
warning = fmt.Sprintf("Failed to set network bridge name %s: %s", bridgeName, err)
95+
return "", fmt.Errorf("failed to set network bridge name %s: %s", bridgeName, err)
9696
}
9797
}
9898

0 commit comments

Comments
 (0)