mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
builder: extra init error handling
* Return errors from creating the `NodeGroup` * Ensure that `b.NodeGroup != nil` before reading from it during validation Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This commit is contained in:
@ -61,7 +61,10 @@ func GetCurrentInstance(txn *store.Txn, dockerCli command.Cli) (*store.NodeGroup
|
||||
return nil, err
|
||||
}
|
||||
if ng == nil {
|
||||
ng, _ = GetNodeGroup(txn, dockerCli, dockerCli.CurrentContext())
|
||||
ng, err = GetNodeGroup(txn, dockerCli, dockerCli.CurrentContext())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return ng, nil
|
||||
|
Reference in New Issue
Block a user