mirror of
https://github.com/golang/go
synced 2024-11-11 23:40:22 -07:00
goinstall: don't wrongly error out with "multiple package names"
Fixes #1215. R=adg, rsc CC=golang-dev https://golang.org/cl/2695042
This commit is contained in:
parent
4228e62259
commit
ee065332dd
@ -56,7 +56,7 @@ func goFiles(dir string, allowMain bool) (files []string, imports map[string]str
|
||||
// do we return pkgName=="main".
|
||||
// A mix of main and another package reverts
|
||||
// to the original (allowMain=false) behaviour.
|
||||
if allowMain && pkgName == "main" {
|
||||
if s == "main" || pkgName == "main" {
|
||||
return goFiles(dir, false)
|
||||
}
|
||||
return nil, nil, "", os.ErrorString("multiple package names in " + dir)
|
||||
|
Loading…
Reference in New Issue
Block a user