Skip to content

Commit

Permalink
util: Skip badly numbered versions
Browse files Browse the repository at this point in the history
This let's us skip over pre-release versions like "40 Beta" or similar.
  • Loading branch information
purpleidea committed Mar 30, 2024
1 parent a1db219 commit 964bd8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func LatestFedoraVersion(ctx context.Context, arch string) (string, error) {
m := 0
for _, r := range data {
version, err := strconv.Atoi(r.Version)
if err != nil {
return "", err
if err != nil { // skip strings like "40 Beta"
continue
}
if arch != "" && arch != r.Arch { // skip others
continue
Expand Down

0 comments on commit 964bd8b

Please sign in to comment.