Skip to content

Commit

Permalink
Move HostsPerLine() to after add
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Apr 6, 2023
1 parent 80973f6 commit 2a53837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ddevapp/hostname_mgt.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func AddHostEntry(name string, ip string) error {
osHostsFilePath := os.ExpandEnv(filepath.FromSlash(goodhosts.HostsFilePath))

hosts, err := goodhosts.NewCustomHosts(osHostsFilePath)
hosts.HostsPerLine(9)

if err != nil {
return err
Expand All @@ -141,6 +140,7 @@ func AddHostEntry(name string, ip string) error {
if err != nil {
return err
}
hosts.HostsPerLine(8)
err = hosts.Flush()
return err
}
Expand Down

0 comments on commit 2a53837

Please sign in to comment.