Skip to content

Commit

Permalink
cmd/status: Honor sortAscending config option
Browse files Browse the repository at this point in the history
Closes #29
  • Loading branch information
jmooring committed Sep 20, 2023
1 parent fbe9ebb commit 89f4fc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/hvm/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"os"
"path/filepath"
"regexp"
"slices"
"strings"

"github.com/jmooring/hvm/pkg/helpers"
Expand Down Expand Up @@ -100,6 +101,9 @@ func status() error {
fmt.Println("Cached versions of the Hugo executable:")
fmt.Println()
semver.Sort(tags)
if !Config.SortAscending {
slices.Reverse(tags)
}
for _, tag := range tags {
fmt.Println(tag)
}
Expand Down

0 comments on commit 89f4fc2

Please sign in to comment.