pkg/minikube: print error messages to stderr

pull/1312/head
Eric Chiang 2017-03-30 19:11:09 -07:00
parent 9f7647f4f4
commit cdffcdf258
2 changed files with 2 additions and 2 deletions

View File

@ -462,7 +462,7 @@ func EnsureMinikubeRunningOrExit(api libmachine.API, exitStatus int) {
os.Exit(1) os.Exit(1)
} }
if s != state.Running.String() { if s != state.Running.String() {
fmt.Fprintln(os.Stdout, "minikube is not currently running so the service cannot be accessed") fmt.Fprintln(os.Stderr, "minikube is not currently running so the service cannot be accessed")
os.Exit(exitStatus) os.Exit(exitStatus)
} }
} }

View File

@ -232,7 +232,7 @@ func WaitAndMaybeOpenService(api libmachine.API, namespace string, service strin
if urlMode || !strings.HasPrefix(url, "http") { if urlMode || !strings.HasPrefix(url, "http") {
fmt.Fprintln(os.Stdout, url) fmt.Fprintln(os.Stdout, url)
} else { } else {
fmt.Fprintln(os.Stdout, "Opening kubernetes service "+namespace+"/"+service+" in default browser...") fmt.Fprintln(os.Stderr, "Opening kubernetes service "+namespace+"/"+service+" in default browser...")
browser.OpenURL(url) browser.OpenURL(url)
} }
} }