Leave dashboard command running when open URL fails (#2081)

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
This commit is contained in:
Kevin Lingerfelt 2019-01-14 16:46:11 -08:00 committed by GitHub
parent 996fd2b013
commit 6a3f4a1a99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -109,16 +109,16 @@ func newCmdDashboard() *cobra.Command {
err = browser.OpenURL(webURL)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to open Linkerd URL %s in the default browser: %s", webURL, err)
os.Exit(1)
fmt.Fprintln(os.Stderr, "Failed to open Linkerd dashboard automatically")
fmt.Fprintf(os.Stderr, "Visit %s in your browser to view the dashboard\n", webURL)
}
case showGrafana:
fmt.Println("Opening Grafana dashboard in the default browser")
err = browser.OpenURL(grafanaURL)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to open Grafana URL %s in the default browser: %s", grafanaURL, err)
os.Exit(1)
fmt.Fprintln(os.Stderr, "Failed to open Grafana dashboard automatically")
fmt.Fprintf(os.Stderr, "Visit %s in your browser to view the dashboard\n", grafanaURL)
}
case showURL:
// no-op, we already printed the URLs