Go DNS lookup order hack

This commit is contained in:
Erik Wilson 2019-11-11 21:20:19 -07:00
parent a5ddbe1f45
commit e4b3730fa2

View file

@ -2,6 +2,7 @@ package cmds
import (
"fmt"
"os"
"github.com/rancher/k3s/pkg/version"
"github.com/sirupsen/logrus"
@ -12,6 +13,13 @@ var (
debug bool
)
func init() {
// hack - force "file,dns" lookup order if go dns is used
if os.Getenv("RES_OPTIONS") == "" {
os.Setenv("RES_OPTIONS", " ")
}
}
func NewApp() *cli.App {
app := cli.NewApp()
app.Name = appName