aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/go/main.go')
-rw-r--r--src/cmd/go/main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/go/main.go b/src/cmd/go/main.go
index 9cc44da84d..02174a56ff 100644
--- a/src/cmd/go/main.go
+++ b/src/cmd/go/main.go
@@ -10,6 +10,7 @@ import (
"context"
"flag"
"fmt"
+ "internal/buildcfg"
"log"
"os"
"path/filepath"
@@ -144,6 +145,11 @@ func main() {
os.Exit(2)
}
+ if err := buildcfg.Error; err != nil {
+ fmt.Fprintf(os.Stderr, "go: %v\n", buildcfg.Error)
+ os.Exit(2)
+ }
+
// Set environment (GOOS, GOARCH, etc) explicitly.
// In theory all the commands we invoke should have
// the same default computation of these as we do,