Add comment explaining pkg/initflag

pull/4887/head
josedonizetti 2019-07-27 11:05:49 -03:00
parent 7ece838d28
commit 08c86b4010
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,8 @@ import (
"os"
"strconv"
// initflag must be imported before any other minikube pkg.
// Fix for https://github.com/kubernetes/minikube/issues/4866
_ "k8s.io/minikube/pkg/initflag"
"github.com/golang/glog"

View File

@ -21,8 +21,9 @@ import (
)
func init() {
// Workaround for "ERROR: logging before flag.Parse"
// See: https://github.com/kubernetes/kubernetes/issues/17162
fs := flag.NewFlagSet("", flag.ContinueOnError)
_ = fs.Parse([]string{})
flag.CommandLine = fs
}