mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
pkg/module: include SSH environments (#1164)
This commit is contained in:
@@ -167,9 +167,23 @@ func PrepareEnv(gopath string) []string {
|
||||
noProxy := 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"))
|
||||
gitSSHCmd := fmt.Sprintf("GIT_SSH_COMMAND=%s", os.Getenv("GIT_SSH_COMMAND"))
|
||||
disableCgo := "CGO_ENABLED=0"
|
||||
enableGoModules := "GO111MODULE=on"
|
||||
cmdEnv := []string{pathEnv, homeEnv, gopathEnv, cacheEnv, disableCgo, enableGoModules, httpProxy, httpsProxy, noProxy}
|
||||
cmdEnv := []string{
|
||||
pathEnv,
|
||||
homeEnv,
|
||||
gopathEnv,
|
||||
cacheEnv,
|
||||
disableCgo,
|
||||
enableGoModules,
|
||||
httpProxy,
|
||||
httpsProxy,
|
||||
noProxy,
|
||||
gitSSH,
|
||||
gitSSHCmd,
|
||||
}
|
||||
|
||||
// add Windows specific ENV VARS
|
||||
if runtime.GOOS == "windows" {
|
||||
|
||||
Reference in New Issue
Block a user