don't add /etc/hosts record if ip is empty (issue #1146)
Signed-off-by: Andrei Ushakov <aushakov@netflix.com>
This commit is contained in:
parent
57a91d9153
commit
e57d2f987d
|
@ -90,6 +90,10 @@ func (sb *sandbox) buildHostsFile() error {
|
||||||
func (sb *sandbox) updateHostsFile(ifaceIP string) error {
|
func (sb *sandbox) updateHostsFile(ifaceIP string) error {
|
||||||
var mhost string
|
var mhost string
|
||||||
|
|
||||||
|
if ifaceIP == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if sb.config.originHostsPath != "" {
|
if sb.config.originHostsPath != "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue