Commit 47a89693 authored by Andrew Gerrand's avatar Andrew Gerrand

misc/dist: clean files from GOPATH after building tour

Fixes #5503.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10989043
parent 8b16a8bb
...@@ -409,6 +409,13 @@ func (b *Build) Do() error { ...@@ -409,6 +409,13 @@ func (b *Build) Do() error {
} }
func (b *Build) tour() 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. // go get the gotour package.
_, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"), "get", *tourPath+"/gotour") _, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"), "get", *tourPath+"/gotour")
if err != nil { if err != nil {
......
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