cmd/tipgodoc: set GOROOT_BOOTSTRAP environment variable

Change-Id: I7d5dc5f7510641d2976f2ea6acf0d52cb10b94e8
Reviewed-on: https://go-review.googlesource.com/3266
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Andrew Gerrand 2015-01-25 02:40:49 +11:00
parent 84312aa521
commit 39a2d013be
2 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,10 @@
FROM golang
FROM golang:1.4.1
RUN apt-get update && apt-get install --no-install-recommends -y -q build-essential git
# golang puts its go install here (weird but true)
ENV GOROOT_BOOTSTRAP /usr/src/go
# golang sets GOPATH=/go
ADD . /go/src/tipgodoc
RUN go install tipgodoc

View File

@ -151,7 +151,11 @@ func initSide(side, goHash, toolsHash string) (godoc *exec.Cmd, hostport string,
}
goBin := filepath.Join(goDir, "bin/go")
install := exec.Command(goBin, "install", "golang.org/x/tools/cmd/godoc")
install.Env = []string{"GOROOT=" + goDir, "GOPATH=" + filepath.Join(dir, "gopath")}
install.Env = []string{
"GOROOT=" + goDir,
"GOPATH=" + filepath.Join(dir, "gopath"),
"GOROOT_BOOTSTRAP=" + os.Getenv("GOROOT_BOOTSTRAP"),
}
if err := runErr(install); err != nil {
return nil, "", err
}