mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
builder: skip name validation for docker context
Although a builder from the store cannot be created unless it has a valid name, this is not the case for a Docker context. We should skip name validation when checking a node from the store and fall back to finding one from Docker context instead. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -74,7 +74,7 @@ func GetCurrentInstance(txn *store.Txn, dockerCli command.Cli) (*store.NodeGroup
|
||||
func GetNodeGroup(txn *store.Txn, dockerCli command.Cli, name string) (*store.NodeGroup, error) {
|
||||
ng, err := txn.NodeGroupByName(name)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(errors.Cause(err)) {
|
||||
if !os.IsNotExist(errors.Cause(err)) && !store.IsErrInvalidName(err) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user