From 764cc545e9a8763aed2e9cf3abba9e0166f73ae5 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 20 Feb 2017 12:00:38 +0100 Subject: [PATCH] cmd/geth: added browser fallback --- cmd/geth/bugcmd.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/geth/bugcmd.go b/cmd/geth/bugcmd.go index 0d89540780..a7be0e8c4a 100644 --- a/cmd/geth/bugcmd.go +++ b/cmd/geth/bugcmd.go @@ -40,6 +40,8 @@ var bugCommand = cli.Command{ Category: "MISCELLANEOUS COMMANDS", } +const issueUrl = "https://github.com/ethereum/go-ethereum/issues/new" + // reportBug reports a bug by opening a new URL to the go-ethereum GH issue // tracker and setting default values as the issue body. func reportBug(ctx *cli.Context) error { @@ -53,7 +55,10 @@ func reportBug(ctx *cli.Context) error { printOSDetails(&buff) // open a new GH issue - browser.Open("https://github.com/ethereum/go-ethereum/issues/new?body=" + url.QueryEscape(buff.String())) + if !browser.Open(issueUrl + "?body=" + url.QueryEscape(buff.String())) { + fmt.Println("Please file a new issue at", issueUrl, "using this template:\n") + fmt.Println(buff.String()) + } return nil }