mirror of
https://github.com/skoelle/kctl-tui.git
synced 2026-09-18 04:20:25 +00:00
fix: config error handling, stderr separation, single-env pane, namespace sort
This commit is contained in:
@@ -76,13 +76,18 @@ func newPanelModel(context, ns, team string) *panelModel {
|
||||
ti.Focus()
|
||||
|
||||
cfgPath, _ := config.DefaultPath()
|
||||
cfg, _ := config.Load(cfgPath)
|
||||
cfg, loadErr := config.Load(cfgPath)
|
||||
|
||||
l := list.New(nil, list.NewDefaultDelegate(), 0, 0)
|
||||
l.SetShowStatusBar(false)
|
||||
|
||||
m := &panelModel{context: context, ns: ns, team: team, cfg: cfg, step: stepEnvMenu, list: l, input: ti}
|
||||
m.showEnvMenu()
|
||||
if loadErr != nil {
|
||||
m.err = fmt.Errorf("config load failed: %w", loadErr)
|
||||
m.step = stepError
|
||||
} else {
|
||||
m.showEnvMenu()
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user