mirror of
https://github.com/golang/go
synced 2024-11-12 04:30:22 -07:00
misc/dist: remove lingering ~ file
Fixes #5405. R=golang-dev, adg CC=golang-dev https://golang.org/cl/9856043
This commit is contained in:
parent
037a1a9f31
commit
77d4347bf2
6
misc/dist/bindist.go
vendored
6
misc/dist/bindist.go
vendored
@ -216,6 +216,12 @@ func (b *Build) Do() error {
|
||||
// Re-install std without -race, so that we're not left
|
||||
// with a slower, race-enabled cmd/go, cmd/godoc, etc.
|
||||
_, err = b.run(src, goCmd, "install", "-a", "std")
|
||||
// Re-building go command leaves old versions of go.exe as go.exe~ on windows.
|
||||
// See (*builder).copyFile in $GOROOT/src/cmd/go/build.go for details.
|
||||
// Remove it manually.
|
||||
if b.OS == "windows" {
|
||||
os.Remove(goCmd + "~")
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user