Skip to content

Commit

Permalink
Exit early if no stations match options
Browse files Browse the repository at this point in the history
  • Loading branch information
msharris committed Mar 15, 2024
1 parent c6bb87f commit 6da6c18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func Run(options Options) error {
stations = filter(stations, options.Locations)
}

if len(stations) == 0 {
return nil
}

sort(stations, options.Sort)

if options.Reverse {
Expand Down

0 comments on commit 6da6c18

Please sign in to comment.