Skip to content

Commit 4ef8ff9

Browse files
committed
Append * to git_source URL if not present
Since `GOPRIVATE` / `GONOPROXY` expect a glob pattern
1 parent a8fa1a7 commit 4ef8ff9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/extractor/util/registryproxy.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ func getEnvVars() []string {
103103
goproxy_servers = append(goproxy_servers, cfg.URL)
104104
slog.Info("Found GOPROXY server", slog.String("url", cfg.URL))
105105
} else if cfg.Type == GIT_SOURCE {
106-
git_sources = append(git_sources, cfg.URL)
106+
if strings.HasSuffix(cfg.URL, "*") {
107+
git_sources = append(git_sources, cfg.URL)
108+
} else {
109+
git_sources = append(git_sources, cfg.URL+"*")
110+
}
107111
slog.Info("Found Git source", slog.String("url", cfg.URL))
108112
}
109113
}

0 commit comments

Comments
 (0)