diff --git a/cmd/tip/godoc.go b/cmd/tip/godoc.go index ab3c3d2e..d16698cb 100644 --- a/cmd/tip/godoc.go +++ b/cmd/tip/godoc.go @@ -36,17 +36,18 @@ func (b godocBuilder) Init(dir, hostport string, heads map[string]string) (*exec return nil, err } goBin := filepath.Join(goDir, "bin/go") + goPath := filepath.Join(dir, "gopath") install := exec.Command(goBin, "install", "golang.org/x/tools/cmd/godoc") install.Env = []string{ "GOROOT=" + goDir, - "GOPATH=" + filepath.Join(dir, "gopath"), + "GOPATH=" + goPath, "GOROOT_BOOTSTRAP=" + os.Getenv("GOROOT_BOOTSTRAP"), } if err := runErr(install); err != nil { return nil, err } - godocBin := filepath.Join(goDir, "bin/godoc") + godocBin := filepath.Join(goPath, "bin/godoc") godoc := exec.Command(godocBin, "-http="+hostport, "-index", "-index_interval=-1s") godoc.Env = []string{"GOROOT=" + goDir} // TODO(adg): log this somewhere useful