mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
* adding support for lower case http proxy env variables * adding in extra blank line
This commit is contained in:
committed by
Aaron Schlesinger
parent
974077e73b
commit
ef3d69ea4a
@@ -165,6 +165,10 @@ func PrepareEnv(gopath string) []string {
|
||||
httpProxy := fmt.Sprintf("HTTP_PROXY=%s", os.Getenv("HTTP_PROXY"))
|
||||
httpsProxy := fmt.Sprintf("HTTPS_PROXY=%s", os.Getenv("HTTPS_PROXY"))
|
||||
noProxy := fmt.Sprintf("NO_PROXY=%s", os.Getenv("NO_PROXY"))
|
||||
// need to also check the lower case version of just these three env variables
|
||||
httpProxyLower := fmt.Sprintf("http_proxy=%s", os.Getenv("http_proxy"))
|
||||
httpsProxyLower := fmt.Sprintf("https_proxy=%s", os.Getenv("https_proxy"))
|
||||
noProxyLower := fmt.Sprintf("no_proxy=%s", os.Getenv("no_proxy"))
|
||||
gopathEnv := fmt.Sprintf("GOPATH=%s", gopath)
|
||||
cacheEnv := fmt.Sprintf("GOCACHE=%s", filepath.Join(gopath, "cache"))
|
||||
gitSSH := fmt.Sprintf("GIT_SSH=%s", os.Getenv("GIT_SSH"))
|
||||
@@ -181,6 +185,9 @@ func PrepareEnv(gopath string) []string {
|
||||
httpProxy,
|
||||
httpsProxy,
|
||||
noProxy,
|
||||
httpProxyLower,
|
||||
httpsProxyLower,
|
||||
noProxyLower,
|
||||
gitSSH,
|
||||
gitSSHCmd,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user