MCPcopy Create free account
hub / github.com/celer-pkg/celer / updateProjectRepos

Method updateProjectRepos

cmds/cmd_update.go:154–170  ·  view source on GitHub ↗
(nameVersions []string)

Source from the content-addressed store, hash-verified

152}
153
154func (u *updateCmd) updateProjectRepos(nameVersions []string) error {
155 if len(nameVersions) == 0 {
156 return fmt.Errorf("no ports specified to update")
157 }
158
159 // Use visited map to prevent infinite recursion in case of circular dependencies.
160 visited := make(map[string]bool)
161
162 for _, nameVersion := range nameVersions {
163 nameVersion = strings.ReplaceAll(nameVersion, "`", "")
164 if err := u.updatePortRepo(nameVersion, visited); err != nil {
165 return err
166 }
167 }
168
169 return nil
170}
171
172func (u *updateCmd) updatePortRepo(nameVersion string, visited map[string]bool) error {
173 // Check for circular dependencies.

Calls 1

updatePortRepoMethod · 0.95