Append * to git_source URL if not present

Since `GOPRIVATE` / `GONOPROXY` expect a glob pattern
This commit is contained in:
Michael B. Gale
2025-09-05 20:35:14 +01:00
parent a8fa1a76c4
commit 4ef8ff9a0f

View File

@@ -103,7 +103,11 @@ func getEnvVars() []string {
goproxy_servers = append(goproxy_servers, cfg.URL)
slog.Info("Found GOPROXY server", slog.String("url", cfg.URL))
} else if cfg.Type == GIT_SOURCE {
git_sources = append(git_sources, cfg.URL)
if strings.HasSuffix(cfg.URL, "*") {
git_sources = append(git_sources, cfg.URL)
} else {
git_sources = append(git_sources, cfg.URL+"*")
}
slog.Info("Found Git source", slog.String("url", cfg.URL))
}
}