Skip to content

Commit

Permalink
Fix the issue that tiup mirror clone not handle yanked tarball correc…
Browse files Browse the repository at this point in the history
…tly (#1061)
  • Loading branch information
lucklove authored Jan 12, 2021
1 parent 25ce8f1 commit b9c6bae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/repository/clone_mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ func cloneComponents(repo *V1Repository,
continue
}
}
if versionItem.Yanked {
if _, err := repo.FetchComponentManifest(name, false); err != nil || versionItem.Yanked {
// The component or the version is yanked, skip download binary
continue
}
if err := download(targetDir, tmpDir, repo, &versionItem); err != nil {
Expand Down

0 comments on commit b9c6bae

Please sign in to comment.