Skip to content

Commit

Permalink
Avoid suggesting go Remote repositories as potential resolver reposit…
Browse files Browse the repository at this point in the history
…ory in go-config (#1329)
  • Loading branch information
sverdlov93 authored Jan 12, 2025
1 parent 96fa7ce commit 66660ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common/commands/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,13 @@ func (configFile *ConfigFile) setResolver(withSnapshot bool) error {
}
// Set resolution repository
if configFile.Resolver.ServerId != "" {
resolverRepos, err := getRepositories(configFile.Resolver.ServerId, utils.Virtual, utils.Remote)
repoTypes := []utils.RepoType{utils.Virtual}
if configFile.ConfigType != project.Go.String() {
// Go doesn't support resolving from Artifactory remote Go repositories. (https://jfrog.com/help/r/jfrog-artifactory-documentation/set-up-remote-go-repositories)
// To resolve dependencies from a Remote Go repository, you must nest the remote repository under a virtual Go repository.
repoTypes = append(repoTypes, utils.Remote)
}
resolverRepos, err := getRepositories(configFile.Resolver.ServerId, repoTypes...)
if err != nil {
log.Error("failed getting repositories list: " + err.Error())
// Continue without auto complete.
Expand Down

0 comments on commit 66660ff

Please sign in to comment.