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:
Christian Rocha
2022-06-01 17:12:21 -07:00
committed by GitHub
parent 97050569c9
commit 775dbfbeff
3 changed files with 131 additions and 114 deletions

View File

@@ -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}
})
}