mirror of https://github.com/docker/compose.git
Merge pull request #832 from gtardif/fix_aci_etchosts
Add trailing empty line in /etc/hosts
This commit is contained in:
commit
367753303d
|
@ -33,6 +33,10 @@ func SetHostNames(file string, hosts ...string) error {
|
||||||
fmt.Println("Setting local hosts for " + strings.Join(hosts, ", "))
|
fmt.Println("Setting local hosts for " + strings.Join(hosts, ", "))
|
||||||
for _, host := range hosts {
|
for _, host := range hosts {
|
||||||
_, err = f.WriteString("\n127.0.0.1 " + host)
|
_, err = f.WriteString("\n127.0.0.1 " + host)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
_, err = f.WriteString("\n")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue