Skip to content

Commit

Permalink
cmd/go/internal/modload: use lockedfile.Read for the initial read of …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
Bryan C. Mills committed Nov 8, 2019
1 parent 4517c02 commit c5fac1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cmd/go/internal/modload/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit c5fac1e

Please sign in to comment.