Skip to content

Commit 9e19a29

Browse files
committed
Fix hosts test on Windows
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent 3f406d4 commit 9e19a29

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

remotes/docker/config/hosts.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@ func parseHostConfig(server string, baseDir string, config HostFileConfig) (host
401401
switch cert := config.CACert.(type) {
402402
case string:
403403
result.caCerts = []string{makeAbsPath(cert, baseDir)}
404-
case []string:
405-
for _, p := range cert {
406-
result.caCerts = append(result.caCerts, makeAbsPath(p, baseDir))
407-
}
408404
case []interface{}:
409405
result.caCerts, err = makeStringSlice(cert, func(p string) string {
410406
return makeAbsPath(p, baseDir)
@@ -428,7 +424,9 @@ func parseHostConfig(server string, baseDir string, config HostFileConfig) (host
428424
case string:
429425
result.clientPairs = append(result.clientPairs, [2]string{makeAbsPath(p, baseDir), ""})
430426
case []interface{}:
431-
slice, err := makeStringSlice(p, nil)
427+
slice, err := makeStringSlice(p, func(s string) string {
428+
return makeAbsPath(s, baseDir)
429+
})
432430
if err != nil {
433431
return hostConfig{}, err
434432
}

0 commit comments

Comments
 (0)