Skip to content

Commit

Permalink
cmd: Sort tags after limiting range
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b authored Sep 19, 2023
1 parent 99f6e19 commit ea50f29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/hvm/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,13 @@ func (r *repository) fetchTags() error {
n = 9999
}
if n <= len(tagNames) {
tagNames = tagNames[len(tagNames)-n:]
if Config.SortAscending {
tagNames = tagNames[len(tagNames)-n:]
} else {
tagNames = tagNames[:n]
}
}

r.tags = tagNames

return nil
Expand Down

0 comments on commit ea50f29

Please sign in to comment.