Skip to content

Commit

Permalink
Leave dashboard command running when open URL fails (#2081)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
  • Loading branch information
klingerf committed Jan 15, 2019
1 parent 996fd2b commit 6a3f4a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a3f4a1

Please sign in to comment.