Merge pull request #1312 from ericchiang/print-to-stderr

pkg/minikube: print error messages to stderr
pull/1316/head
Matt Rickard 2017-03-30 19:42:49 -07:00 committed by GitHub
commit 4ef8d2eb30
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)
} }
} }