From 592d787f930b6b5ebb3e64c591204e025f9d6fd0 Mon Sep 17 00:00:00 2001 From: Dolev Hadar Date: Tue, 13 Aug 2024 00:39:47 +0300 Subject: [PATCH] revert: run commands without tea.ExecProcess --- ui/components/tasks/pr.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/components/tasks/pr.go b/ui/components/tasks/pr.go index e775850b..6f74047a 100644 --- a/ui/components/tasks/pr.go +++ b/ui/components/tasks/pr.go @@ -50,16 +50,18 @@ func fireTask(ctx *context.ProgramContext, task GitHubTask) tea.Cmd { } startCmd := ctx.StartTask(start) - c := exec.Command("gh", task.Args...) - return tea.Batch(startCmd, tea.ExecProcess(c, func(err error) tea.Msg { + return tea.Batch(startCmd, func() tea.Msg { + c := exec.Command("gh", task.Args...) + + err := c.Run() return constants.TaskFinishedMsg{ + TaskId: task.Id, SectionId: task.Section.Id, SectionType: task.Section.Type, - TaskId: task.Id, Err: err, Msg: task.Msg(c, err), } - })) + }) } func ReopenPR(ctx *context.ProgramContext, section SectionIdentifer, pr data.RowData) tea.Cmd {