Skip to content

Commit

Permalink
Set GO111MODULE=off in GoStdLib action
Browse files Browse the repository at this point in the history
This is a partial cherry-pick of #2090 for release branches only.

Fixes #1987
  • Loading branch information
Jay Conrod committed Jul 8, 2019
1 parent 1daaaef commit 521605a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/tools/builders/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func stdlib(args []string) error {
// Now switch to the newly created GOROOT
os.Setenv("GOROOT", output)

// Disable modules for the 'go install' command. Depending on the sandboxing
// mode, there may be a go.mod file in a parent directory which will turn
// modules on in "auto" mode.
os.Setenv("GO111MODULE", "off")

// Create a temporary cache directory. "go build" requires this starting
// in Go 1.12.
cachePath := filepath.Join(output, ".gocache")
Expand Down

0 comments on commit 521605a

Please sign in to comment.