Skip to content

Commit

Permalink
exit bubbletea and show error if error happended while using bubbletea
Browse files Browse the repository at this point in the history
Signed-off-by: zychen5186 <[email protected]>
  • Loading branch information
zychen5186 committed Jul 5, 2024
1 parent 006d630 commit 85626df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions flytectl/pkg/bubbletea/bubbletea_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (m listModel) listUpdate(msg tea.Msg) (tea.Model, tea.Cmd) {
curArgs = append(curArgs, string(item))
err := makeListModel(&m, string(item))
if err != nil || m.quitting {
listErrMsg = err
return m, tea.Quit
}
return m, nil
Expand Down
5 changes: 4 additions & 1 deletion flytectl/pkg/bubbletea/bubbletea_list_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ func makeFlagListModel(m *listModel) error {
}
case "-d":
curArgs = append(curArgs, flag)
makeDomainListModel(m)
err := makeDomainListModel(m)
if err != nil {
return err
}
}

return nil
Expand Down

0 comments on commit 85626df

Please sign in to comment.