]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add an exception for 'go telemetry off' to not open counters
authorMichael Matloob <matloob@golang.org>
Fri, 6 Sep 2024 17:59:16 +0000 (13:59 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 9 Sep 2024 14:36:44 +0000 (14:36 +0000)
commit5858205831117498e7b65ded82e398b28cff6c37
tree1433e4be53dd4fd82f08d77e31ee1381196d6e50
parent807e01db4840e25e4d98911b28a8fa54244b8dfa
cmd/go: add an exception for 'go telemetry off' to not open counters

There is the expectation that if 'go telemetry off' is run with a clean
home directory that no counter files are written. But we were writing
counters in that case because the act of turning telemetry off was done
after the act of opening the counter files, so the counter files were
opened depending on what the previous mode was. Add a special check that
the command is not 'go telemetry off' before opening counter files.

Fixes #69269

Change-Id: I8fc37dfe24ec7f454676cc2fdd4b79a13a7aba9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/611456
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
src/cmd/go/main.go
src/cmd/go/testdata/script/telemetry.txt