1
0
mirror of https://github.com/mrusme/neonmodem.git synced 2024-12-04 14:46:37 -05:00

Added error handling for systems loader

This commit is contained in:
マリウス 2023-06-15 12:37:40 -05:00
parent 136ee0bfed
commit c85b4023cf
No known key found for this signature in database

View File

@ -119,7 +119,13 @@ var rootCmd = &cobra.Command{
var err error
c := ctx.New(EMBEDFS, &CFG, LOG)
_ = loadSystems(&c) // TODO: Handle errs
errs := loadSystems(&c)
if len(errs) > 0 {
for _, err = range errs {
c.Logger.Error(err)
}
panic("Error(s) loading system(s)")
}
tui := tea.NewProgram(ui.NewModel(&c), tea.WithAltScreen())
err = tui.Start()