fix: update to toast instead of app exit post changes

This commit is contained in:
John Henry Rudden 2025-07-05 16:34:31 -05:00
parent bff60e332d
commit 1523afbcc3

View file

@ -983,12 +983,12 @@ func (a appModel) executeCommand(command commands.Command) (tea.Model, tea.Cmd)
c.Stdin = os.Stdin
c.Stdout = os.Stdout
c.Stderr = os.Stderr
cmd := tea.ExecProcess(c, func(err error) tea.Msg {
cmd := tea.ExecProcess(c, func(err error) tea.Msg {
if err != nil {
slog.Error("Failed to open config", "error", err)
return toast.NewErrorToast("Failed to open config")()
}
return tea.QuitMsg{}
return toast.NewSuccessToast("Config updated, restart to apply changes")()
})
cmds = append(cmds, cmd)
case commands.AppExitCommand: