]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] cmd/go: do not ignore DepsErrors in 'go run'
authorRobert Hencke <robert.hencke@gmail.com>
Wed, 13 Jun 2012 20:23:38 +0000 (16:23 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 13 Jun 2012 20:23:38 +0000 (16:23 -0400)
««« backport 1d4d8324085b
cmd/go: do not ignore DepsErrors in 'go run'

Fixes #3490.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6040046

»»»

src/cmd/go/run.go

index 94cd5929691da5152e877c549feaafada5599eea..6043b7e2029d8c85d2db09d6d2c640e53df41401 100644 (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")
        }