Skip to content

Commit 5d9bf37

Browse files
committed
Don't use GOPROXY for git_sources
1 parent 3874f12 commit 5d9bf37

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

go/extractor/util/registryproxy.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,17 @@ func getEnvVars() []string {
108108
}
109109
}
110110

111-
goprivate := []string{}
112-
113111
if len(goproxy_servers) > 0 {
114112
goproxy_val := "https://proxy.golang.org,direct"
115113

116114
for _, url := range goproxy_servers {
117115
goproxy_val = url + "," + goproxy_val
118116
}
119117

120-
result = append(result, fmt.Sprintf("GOPROXY=%s", goproxy_val), "GONOPROXY=")
118+
result = append(result, fmt.Sprintf("GOPROXY=%s", goproxy_val))
121119
}
122120

123121
if len(git_sources) > 0 {
124-
goprivate = append(goprivate, git_sources...)
125-
126122
if proxy_cert_file != "" {
127123
cmd := exec.Command("git", "config", "--global", "http.sslCAInfo", proxy_cert_file)
128124

@@ -135,7 +131,8 @@ func getEnvVars() []string {
135131
}
136132
}
137133

138-
result = append(result, fmt.Sprintf("GOPRIVATE=%s", strings.Join(goprivate, ",")))
134+
result = append(result, fmt.Sprintf("GOPRIVATE=%s", strings.Join(git_sources, ",")))
135+
result = append(result, fmt.Sprintf("GONOPROXY=%s", strings.Join(git_sources, ",")))
139136
}
140137
}
141138

0 commit comments

Comments
 (0)