Skip to content

Commit

Permalink
Minor change to the verhist command
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Mar 24, 2024
1 parent e4a3c19 commit 92420fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/verhist/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ func run(ctx context.Context, w io.Writer, latest bool, platform, channel string
case len(versions) < 1:
return verhist.ErrNoVersionsReturned
}
var v interface{} = versions
if latest {
v = versions[0]
_, err := fmt.Fprintf(w, "%s\n", versions[0].Version)
return err
}
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
return enc.Encode(v)
return enc.Encode(versions)
}

0 comments on commit 92420fe

Please sign in to comment.