@matloob requested issue #65264 to be considered for backport to the next 1.22 minor release.

@gopherbot please backport to Go 1.21 and Go 1.22

Comment From: gopherbot

Change https://go.dev/cl/595496 mentions this issue: [release-branch.go1.22] cmd/go: fix build config before creating actions for 'go list -cover'

Comment From: gopherbot

Change https://go.dev/cl/595495 mentions this issue: [release-branch.go1.21] cmd/go: fix build config before creating actions for 'go list -cover'

Comment From: gopherbot

Closed by merging 49906f9575149afdf7e542fa24c7447c0ef78c49 to release-branch.go1.22.