Go: Fix/improve comment about environment variable preservation

This commit is contained in:
Michael B. Gale
2025-04-25 15:41:35 +01:00
parent e805d1ee90
commit 9cfa451477

View File

@@ -133,7 +133,8 @@ func ApplyProxyEnvVars(cmd *exec.Cmd) {
}
// If the proxy is configured, `proxy_vars` will be not `nil`. We append those
// variables Preserve environment variables
// variables to the existing environment to preserve those environment variables.
// If `cmd.Env` is not changed, then the existing environment is also preserved.
if proxy_vars != nil {
cmd.Env = append(os.Environ(), proxy_vars...)
}