mirror of
https://github.com/golang/go
synced 2024-11-23 17:20:02 -07:00
cmd/go/internal/modload: use lockedfile.Read for the initial read of the go.mod file
Updates #34634 Fixes #35425 Change-Id: I878a8d229b33dcde9e7d4dfd82ddf9815d38a465 Reviewed-on: https://go-review.googlesource.com/c/go/+/206142 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
4517c02f28
commit
c5fac1edc4
@ -28,7 +28,6 @@ import (
|
||||
"cmd/go/internal/modfetch"
|
||||
"cmd/go/internal/modfetch/codehost"
|
||||
"cmd/go/internal/mvs"
|
||||
"cmd/go/internal/renameio"
|
||||
"cmd/go/internal/search"
|
||||
|
||||
"golang.org/x/mod/modfile"
|
||||
@ -398,7 +397,7 @@ func InitMod() {
|
||||
}
|
||||
|
||||
gomod := ModFilePath()
|
||||
data, err := renameio.ReadFile(gomod)
|
||||
data, err := lockedfile.Read(gomod)
|
||||
if err != nil {
|
||||
base.Fatalf("go: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user