Commit ee065332 authored by Fazlul Shahriar's avatar Fazlul Shahriar Committed by Andrew Gerrand

goinstall: don't wrongly error out with "multiple package names"

Fixes #1215.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/2695042
parent 4228e622
......@@ -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)
......
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