]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix go.mod corruption using -mod=vendor
authorRuss Cox <rsc@golang.org>
Thu, 9 Aug 2018 20:16:43 +0000 (16:16 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 10 Aug 2018 00:47:20 +0000 (00:47 +0000)
commitcb7d0efc2380b1231bc858058ac9f0032a8002ea
tree12a0a9da77e2f19aa73749292e8453aaa6b4776d
parent7aa9855704a766a1a16fbed79f9f6e34fc83bdf0
cmd/go: fix go.mod corruption using -mod=vendor

If we're using -mod=vendor then we effectively load
a fake build list from vendor/modules.txt.
Do not write it back to go.mod.

Fixes #26704.

Change-Id: Ie79f2103dc16d0b7fe0c884e77ba726c7e04f2e4
Reviewed-on: https://go-review.googlesource.com/128899
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/mod_vendor_build.txt [new file with mode: 0644]