diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-10-18 16:52:12 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-10-21 15:48:39 +0000 |
commit | 84b0e3665d9684b9957103deaa9c5984c146cdfd (patch) | |
tree | 68c1cb13d98c0b40f8dfc5dfe6fde19e92df3c9b /src/cmd/go/internal/cfg/cfg.go | |
parent | b653c878b1ad8d1b4f8d7b04201d0cb0a4156ead (diff) | |
download | go-84b0e3665d9684b9957103deaa9c5984c146cdfd.tar.gz go-84b0e3665d9684b9957103deaa9c5984c146cdfd.zip |
cmd/go: add a flag to avoid creating unwritable directories in the module cache
This change adds the '-modcacherw' build flag, which leaves
newly-created directories (but not the files!) in the module cache
read-write instead of making them unwritable.
Fixes #31481
Change-Id: I7c21a53dd145676627c3b51096914ce797991d99
Reviewed-on: https://go-review.googlesource.com/c/go/+/202079
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/cfg/cfg.go')
-rw-r--r-- | src/cmd/go/internal/cfg/cfg.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go index a3277a6c3f..ea909b5b37 100644 --- a/src/cmd/go/internal/cfg/cfg.go +++ b/src/cmd/go/internal/cfg/cfg.go @@ -33,6 +33,7 @@ var ( BuildN bool // -n flag BuildO string // -o flag BuildP = runtime.NumCPU() // -p flag + BuildModcacheRW bool // -modcacherw flag BuildPkgdir string // -pkgdir flag BuildRace bool // -race flag BuildToolexec []string // -toolexec flag |