mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Go: Preserve environment variables in ApplyProxyEnvVars
This commit is contained in:
@@ -91,6 +91,9 @@ func ApplyProxyEnvVars(cmd *exec.Cmd) {
|
||||
|
||||
checkEnvVars()
|
||||
|
||||
// Preserve environment variables
|
||||
cmd.Env = os.Environ()
|
||||
|
||||
if proxy_address != "" {
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("HTTP_PROXY=%s", proxy_address))
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("HTTPS_PROXY=%s", proxy_address))
|
||||
|
||||
Reference in New Issue
Block a user