1
0
mirror of https://github.com/golang/go synced 2024-09-29 12:04:28 -06:00

cmd/go: make files copied from GOROOT writable in TestNewReleaseRebuildsStalePackagesInGOPATH

The whole point of copying these files is so that we can modify them.

Updates #30316

Change-Id: Iaba7ddec5159078f2c3d3451cbab363365b15c9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/207963
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Bryan C. Mills 2019-11-19 13:36:39 -05:00
parent 8608733e93
commit 39b44e88af

View File

@ -946,7 +946,7 @@ func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) {
return err
}
tg.tempFile(dest, string(data))
if err := os.Chmod(tg.path(dest), info.Mode()); err != nil {
if err := os.Chmod(tg.path(dest), info.Mode()|0200); err != nil {
return err
}
return nil