cmd/go: do not ignore DepsErrors in 'go run'

Fixes #3490.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6040046
This commit is contained in:
Robert Hencke 2012-04-30 17:00:24 -04:00 committed by Russ Cox
parent 44fd1d1a6a
commit 84ce0f7687
1 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,10 @@ func runRun(cmd *Command, args []string) {
if p.Error != nil {
fatalf("%s", p.Error)
}
for _, err := range p.DepsErrors {
errorf("%s", err)
}
exitIfErrors()
if p.Name != "main" {
fatalf("go run: cannot run non-main package")
}