fix: don't add a path prefix if host is github.com
@@ -88,6 +88,7 @@ type httpResolverFactory struct {
func (f *httpResolverFactory) CentralRemote(org, repo string) RemoteResolver {
return HTTPResolver(func() (*url.URL, error) {
path := fmt.Sprintf("%s/%s", org, repo)
+ if f.host != "github.com" {
cloneSuffix := os.Getenv("GIT_CLONE_PATH_PREFIX")
if cloneSuffix != "" {
cloneSuffix = strings.TrimPrefix(cloneSuffix, "/")
@@ -96,6 +97,7 @@ func (f *httpResolverFactory) CentralRemote(org, repo string) RemoteResolver {
if cloneSuffix != "" {
path = fmt.Sprintf("%s/%s", cloneSuffix, path)
}
+ }
return &url.URL{Scheme: applyDefaultScheme(f.scheme), Host: f.host, Path: path}, nil
}, f.username, f.token)
}
