Skip to content

Commit

Permalink
Return errMsg when menu is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Sep 22, 2021
1 parent 22c47ee commit 6f287f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tui/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func (b *Bubble) setupCmd() tea.Msg {
mes = append(mes, MenuEntry{Name: r.Name, Repo: r.Name})
}
}
if len(mes) == 0 {
return errMsg{fmt.Errorf("no repos found")}
}
var tmplConfig *Config
for _, me := range mes {
if me.Repo == "config" {
Expand Down

0 comments on commit 6f287f0

Please sign in to comment.