Skip to content

Commit

Permalink
Return empty array if are no installations
Browse files Browse the repository at this point in the history
  • Loading branch information
Link- committed Sep 23, 2023
1 parent 8544d7d commit a69ba12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/installations.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func Installations(c *cli.Context) error {
return fmt.Errorf("failed marshalling installations to JSON: %w", err)
}

if len(*installations) < 1 {
fmt.Println("[]")
return nil
}

fmt.Println(string(bytes))

return nil
Expand Down

0 comments on commit a69ba12

Please sign in to comment.