Skip to content

Commit

Permalink
cmd/mirror: format versions for clone subcmd
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis committed Apr 13, 2021
1 parent 003056a commit 3d2139d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cmd/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,17 @@ func newMirrorCloneCmd() *cobra.Command {
return spec.TiDBComponentVersion(comp, "")
}

return repository.CloneMirror(repo, components, versionMapper, args[0], args[1:], options)
// format input versions
versionList := make([]string, 0)
for _, ver := range args[1:] {
v, err := utils.FmtVer(ver)
if err != nil {
return err
}
versionList = append(versionList, v)
}

return repository.CloneMirror(repo, components, versionMapper, args[0], versionList, options)
},
}

Expand Down

0 comments on commit 3d2139d

Please sign in to comment.