Skip to content

Commit

Permalink
Fix the issue that clone will download yanked component
Browse files Browse the repository at this point in the history
  • Loading branch information
lucklove committed Apr 20, 2021
1 parent ba88036 commit f26e127
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,14 @@ func newMirrorCloneCmd() *cobra.Command {
}

if index != nil && len(index.Components) > 0 {
for name := range index.Components {
for name, comp := range index.Components {
if comp.Yanked {
continue
}
components = append(components, name)
}
}
sort.Strings(components)

for _, name := range components {
options.Components[name] = new([]string)
cmd.Flags().StringSliceVar(options.Components[name], name, nil, "Specify the versions for component "+name)
Expand Down

0 comments on commit f26e127

Please sign in to comment.