mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
chore(exec): small API edits (#323)
* feat: add OSExec helper function for running exec.Cmds * chore: for now, un-expose WrapExecCommand * chore: move exec struff into its own file * chore(exec): better name for Exec func that wraps exec.Cmd (thanks, @toby)
This commit is contained in:
@@ -12,7 +12,7 @@ type editorFinishedMsg struct{ err error }
|
||||
|
||||
func openEditor() tea.Cmd {
|
||||
c := exec.Command(os.Getenv("EDITOR")) //nolint:gosec
|
||||
return tea.Exec(tea.WrapExecCommand(c), func(err error) tea.Msg {
|
||||
return tea.ExecProcess(c, func(err error) tea.Msg {
|
||||
return editorFinishedMsg{err}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user