mirror of
https://github.com/golang/go
synced 2024-11-18 09:04:49 -07:00
cmd/tip: look for godoc binary under $GOPATH/bin instead of $GOROOT/bin
A recent change to the cmd/go tool made it place godoc in $GOPATH/bin instead of the special-cased $GOROOT/bin. Change-Id: If026ff7e3a521ee2aa9b4107585124df108d7124 Reviewed-on: https://go-review.googlesource.com/21951 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
446a18e709
commit
c3291436fa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user