Commit 7711e610 authored by Russ Cox's avatar Russ Cox

cmd/go: show $GOPATH in 'go env' output

Also, sort output.

R=golang-dev, patrick, dave, iant
CC=golang-dev, patrick
https://golang.org/cl/6446064
parent e5335101
......@@ -6,6 +6,7 @@ package main
import (
"fmt"
"os"
"runtime"
"strings"
)
......@@ -33,16 +34,17 @@ func mkEnv() []envVar {
b.init()
env := []envVar{
{"GOROOT", goroot},
{"GOBIN", gobin},
{"GOARCH", goarch},
{"GOBIN", gobin},
{"GOCHAR", archChar},
{"GOOS", goos},
{"GOEXE", exeSuffix},
{"GOGCCFLAGS", strings.Join(b.gccCmd(".")[3:], " ")},
{"GOHOSTARCH", runtime.GOARCH},
{"GOHOSTOS", runtime.GOOS},
{"GOOS", goos},
{"GOPATH", os.Getenv("GOPATH")},
{"GOROOT", goroot},
{"GOTOOLDIR", toolDir},
{"GOGCCFLAGS", strings.Join(b.gccCmd(".")[3:], " ")},
}
if buildContext.CgoEnabled {
......
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