mirror of
https://github.com/golang/go.git
synced 2025-05-28 19:02:22 +00:00
misc/dist: clean files from GOPATH after building tour
Fixes #5503. R=golang-dev, r CC=golang-dev https://golang.org/cl/10989043
This commit is contained in:
parent
8b16a8bbc1
commit
47a89693e9
7
misc/dist/bindist.go
vendored
7
misc/dist/bindist.go
vendored
@ -409,6 +409,13 @@ func (b *Build) Do() error {
|
||||
}
|
||||
|
||||
func (b *Build) tour() error {
|
||||
defer func() {
|
||||
// Clean work files from GOPATH directory.
|
||||
for _, d := range []string{"bin", "pkg", "src"} {
|
||||
os.RemoveAll(filepath.Join(b.gopath, d))
|
||||
}
|
||||
}()
|
||||
|
||||
// go get the gotour package.
|
||||
_, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"), "get", *tourPath+"/gotour")
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user