]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix non-script staleness checks interacting badly with GOFLAGS
authorJakub Warczarek <jakub.warczarek@gmail.com>
Sat, 12 Dec 2020 17:43:52 +0000 (17:43 +0000)
committerBryan C. Mills <bcmills@google.com>
Mon, 11 Jan 2021 21:34:46 +0000 (21:34 +0000)
Fixes #43012.

Change-Id: Idc7a64b53c411e6dadd98521a48e15e664737d42
GitHub-Last-Rev: b56c0880c3b5ceb86c6fa2ba6bf82f8969e10472
GitHub-Pull-Request: golang/go#43155
Reviewed-on: https://go-review.googlesource.com/c/go/+/277453
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/cmd/go/go_test.go

index 3cd3454d5a0c89a75c41977fd72e79cff2ce448e..3ce32388d05dd8785ed94e074b4dc1ef47a2c128 100644 (file)
@@ -216,6 +216,7 @@ func TestMain(m *testing.M) {
        }
        // Don't let these environment variables confuse the test.
        os.Setenv("GOENV", "off")
+       os.Unsetenv("GOFLAGS")
        os.Unsetenv("GOBIN")
        os.Unsetenv("GOPATH")
        os.Unsetenv("GIT_ALLOW_PROTOCOL")