Skip to content

Commit

Permalink
Fix issue with empty host tree in hosts.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Nov 7, 2024
1 parent 0bc8265 commit 7913747
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions remotes/docker/config/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package config
import (
"context"
"crypto/tls"
"errors"
"fmt"
"net"
"net/http"
Expand Down Expand Up @@ -542,7 +541,7 @@ func parseHostConfig(server string, baseDir string, config hostFileConfig) (host
func getSortedHosts(root *toml.Tree) ([]string, error) {
iter, ok := root.Get("host").(*toml.Tree)
if !ok {
return nil, errors.New("invalid `host` tree")
return nil, nil
}

list := append([]string{}, iter.Keys()...)
Expand Down

0 comments on commit 7913747

Please sign in to comment.