commit | 8478b8f199df4c37959c3951bb00767ff285a9fd | [log] [tgz] |
---|---|---|
author | Baokun Lee <nototon@gmail.com> | Fri Apr 20 14:54:41 2018 +0800 |
committer | Russ Cox <rsc@golang.org> | Fri Apr 27 14:46:06 2018 +0000 |
tree | 9eec941a4def902d25854d0974efc03822e23906 | |
parent | b1062e5e61eb9de5fe0f5d2ef13fb68f981e3089 [diff] |
cmd/go/internal/vgo: report failure when $GOPATH/go.mod exists Fixes golang/go#24106. Change-Id: I00c223ae9208577a1dff6a2b6ba250315fd602a7 Reviewed-on: https://go-review.googlesource.com/108379 Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/vendor/cmd/go/internal/vgo/init.go b/vendor/cmd/go/internal/vgo/init.go index 269e425..4a9b5bf 100644 --- a/vendor/cmd/go/internal/vgo/init.go +++ b/vendor/cmd/go/internal/vgo/init.go
@@ -113,6 +113,9 @@ base.Fatalf("missing $GOPATH") } gopath = list[0] + if _, err := os.Stat(filepath.Join(gopath, "go.mod")); err == nil { + base.Fatalf("$GOPATH/go.mod exists but should not") + } srcV = filepath.Join(list[0], "src/v") codehost.WorkRoot = filepath.Join(srcV, "cache/vcswork")