A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jesseduffield/lazygit/commit/8d7740a5acabc87b6be98315881dd97e57832220 below:

Don't kill tasks when we no longer need them · jesseduffield/lazygit@8d7740a · GitHub

@@ -5,12 +5,10 @@ import (

5 5

"fmt"

6 6

"io"

7 7

"os/exec"

8 -

"strings"

9 8

"sync"

10 9

"time"

11 10 12 11

"github.com/jesseduffield/gocui"

13 -

"github.com/jesseduffield/lazygit/pkg/commands/oscommands"

14 12

"github.com/jesseduffield/lazygit/pkg/utils"

15 13

"github.com/sasha-s/go-deadlock"

16 14

"github.com/sirupsen/logrus"

@@ -167,14 +165,7 @@ func (self *ViewBufferManager) NewCmdTask(start func() (*exec.Cmd, io.Reader), p

167 165

// and the user is flicking through a bunch of items.

168 166

self.throttle = time.Since(startTime) < THROTTLE_TIME && timeToStart > COMMAND_START_THRESHOLD

169 167 170 -

// Kill the still-running command.

171 -

if err := oscommands.Kill(cmd); err != nil {

172 -

if !strings.Contains(err.Error(), "process already finished") {

173 -

self.Log.Errorf("error when trying to kill cmd task: %v; Command: %v %v", err, cmd.Path, cmd.Args)

174 -

}

175 -

}

176 - 177 -

// for pty's we need to call onDone here so that cmd.Wait() doesn't block forever

168 +

// close the task's stdout pipe (or the pty if we're using one) to make the command terminate

178 169

onDone()

179 170

}

180 171

})


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4