Commit c5fac1ed authored by Bryan C. Mills's avatar Bryan C. Mills

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 4517c02f
......@@ -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)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment