mirror of https://github.com/linkerd/linkerd2.git
Leave dashboard command running when open URL fails (#2081)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
This commit is contained in:
parent
996fd2b013
commit
6a3f4a1a99
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue