]> Cypherpunks repositories - gostls13.git/commit
cmd/go: avoid setting mod=vendor in workspace mode
authorMichael Matloob <matloob@golang.org>
Wed, 5 Oct 2022 23:06:23 +0000 (19:06 -0400)
committerMichael Matloob <matloob@golang.org>
Thu, 13 Oct 2022 20:22:29 +0000 (20:22 +0000)
commit005c78d8bbf6389d482a0bbb4e6c46719d77f59f
tree00476ae00c380819b2fb7dd249dd2b583e2b8f51
parent498ee73a4b9f48c0916bb5a2bdd22ddf6aca79c6
cmd/go: avoid setting mod=vendor in workspace mode

Workspaces with a single module would enter mod=vendor mode even when
in workspace mode. Fix that by explicitly checking that we're not in
workspace mode when deciding whether to enter vendor mode.

Fixes #54130

Change-Id: I03fcd9db4160c9872aa2b7957a80f24d49f787d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/439415
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/work_disablevendor.txt [new file with mode: 0644]