Skip to content

Commit

Permalink
Fix the issue that clone will add yanked component (#1321)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucklove authored Apr 21, 2021
1 parent ba88036 commit cbc53fa
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 cbc53fa

Please sign in to comment.