mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
tweak
This commit is contained in:
parent
e228d8d366
commit
1effee57e9
|
|
@ -101,12 +101,11 @@ func (ecf *ExternalCmd) Apply(ctx context.Context, buf []line.Line, out pipeline
|
|||
return errors.Wrap(err, `failed to start command`)
|
||||
}
|
||||
|
||||
go cmd.Wait()
|
||||
|
||||
cmdCh := make(chan line.Line)
|
||||
go func(ctx context.Context, cmdCh chan line.Line, rdr *bufio.Reader) {
|
||||
defer func() { recover() }()
|
||||
defer close(cmdCh)
|
||||
defer cmd.Wait()
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
|
|
|
|||
Loading…
Reference in a new issue