mirror of https://github.com/golang/go.git
internal/lsp/cache: fix AllowModfileModifications on 1.16
We still need to pass -mod=mod when AllowModfileModifications is enabled on 1.16. Change-Id: I9cecd30914eb52c9faa877cece25d5722b36df79 Reviewed-on: https://go-review.googlesource.com/c/tools/+/289695 Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
6baea3f8f3
commit
6d19fbfa2b
|
|
@ -326,6 +326,8 @@ func (s *snapshot) goCommandInvocation(ctx context.Context, flags source.Invocat
|
|||
inv.ModFlag = "vendor"
|
||||
} else if !allowModfileModificationOption {
|
||||
inv.ModFlag = "readonly"
|
||||
} else {
|
||||
inv.ModFlag = mutableModFlag
|
||||
}
|
||||
case source.UpdateUserModFile, source.WriteTemporaryModFile:
|
||||
inv.ModFlag = mutableModFlag
|
||||
|
|
|
|||
Loading…
Reference in New Issue