1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00

cmd/go: prevent packages from being cleaned more than once

If a package was listed as a dependency from multiple places, it
could have been cleaned repeatedly.

R=golang-dev, dave, rsc, seed, bradfitz
CC=golang-dev, minux.ma
https://golang.org/cl/7482043
This commit is contained in:
Lucio De Re 2013-04-01 10:01:12 -07:00 committed by Brad Fitzpatrick
parent 174a17e3c6
commit 79a0c17012

View File

@ -106,6 +106,8 @@ func clean(p *Package) {
if cleaned[p] {
return
}
cleaned[p] = true
if p.Dir == "" {
errorf("can't load package: %v", p.Error)
return