Skip to content

Commit

Permalink
Fix hosts test on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
  • Loading branch information
mxpv committed Mar 27, 2021
1 parent 3f406d4 commit 9e19a29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions remotes/docker/config/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@ func parseHostConfig(server string, baseDir string, config HostFileConfig) (host
switch cert := config.CACert.(type) {
case string:
result.caCerts = []string{makeAbsPath(cert, baseDir)}
case []string:
for _, p := range cert {
result.caCerts = append(result.caCerts, makeAbsPath(p, baseDir))
}
case []interface{}:
result.caCerts, err = makeStringSlice(cert, func(p string) string {
return makeAbsPath(p, baseDir)
Expand All @@ -428,7 +424,9 @@ func parseHostConfig(server string, baseDir string, config HostFileConfig) (host
case string:
result.clientPairs = append(result.clientPairs, [2]string{makeAbsPath(p, baseDir), ""})
case []interface{}:
slice, err := makeStringSlice(p, nil)
slice, err := makeStringSlice(p, func(s string) string {
return makeAbsPath(s, baseDir)
})
if err != nil {
return hostConfig{}, err
}
Expand Down

0 comments on commit 9e19a29

Please sign in to comment.