Commit fc2e282c authored by Russ Cox's avatar Russ Cox

cmd/go: add version of GOROOT to go bug details

Fixes #15877.

Change-Id: Ia1e327c0cea3be43e5f8ba637c97c223cee4bb5a
Reviewed-on: https://go-review.googlesource.com/32643
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 89ccd579
......@@ -44,6 +44,7 @@ func runBug(cmd *Command, args []string) {
for _, e := range env {
fmt.Fprintf(&buf, "%s=\"%s\"\n", e.name, e.value)
}
printGoDetails(&buf)
printOSDetails(&buf)
printCDetails(&buf)
fmt.Fprintln(&buf, "```")
......@@ -72,6 +73,11 @@ A link on play.golang.org is best.
`
func printGoDetails(w io.Writer) {
printCmdOut(w, "GOROOT/bin/go version: ", filepath.Join(runtime.GOROOT(), "bin/go"), "version")
printCmdOut(w, "GOROOT/bin/go tool compile -v: ", filepath.Join(runtime.GOROOT(), "bin/go"), "tool", "compile", "-V")
}
func printOSDetails(w io.Writer) {
switch runtime.GOOS {
case "darwin":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment