cmd/go/internal/envcmd: report GOPACKAGESDRIVER
While not recognized by cmd/go, this helps with
bug reports around the tooling ecosystem.
Fixes #75930
diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
index e950c65..3238a8b 100644
--- a/src/cmd/go/internal/envcmd/env.go
+++ b/src/cmd/go/internal/envcmd/env.go
@@ -106,6 +106,13 @@
{Name: "GONOPROXY", Value: cfg.GONOPROXY, Changed: cfg.GONOPROXYChanged},
{Name: "GONOSUMDB", Value: cfg.GONOSUMDB, Changed: cfg.GONOSUMDBChanged},
{Name: "GOOS", Value: cfg.Goos, Changed: cfg.Goos != runtime.GOOS},
+
+ // GOPACKAGESDRIVER isn't read or used by cmd/go, so it can only
+ // be sourced from environment variables.
+ // We include it for bug reports.
+ // go.dev/issue/75930
+ {Name: "GOPACKAGESDRIVER", Value: os.Getenv("GOPACKAGESDRIVER")},
+
{Name: "GOPATH", Value: cfg.BuildContext.GOPATH, Changed: cfg.GOPATHChanged},
{Name: "GOPRIVATE", Value: cfg.GOPRIVATE},
{Name: "GOPROXY", Value: cfg.GOPROXY, Changed: cfg.GOPROXYChanged},
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
case "GOBIN", "GOEXPERIMENT", "GOFLAGS", "GOINSECURE", "GOPRIVATE", "GOTMPDIR", "GOVCS":I think you'll need to add GOPACKAGESDRIVER here to ensure that its Changed flag is correctly set (see CL 563137).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
case "GOBIN", "GOEXPERIMENT", "GOFLAGS", "GOINSECURE", "GOPRIVATE", "GOTMPDIR", "GOVCS":I think you'll need to add GOPACKAGESDRIVER here to ensure that its Changed flag is correctly set (see CL 563137).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |