mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Add separate UsePty flag for CmdObj
This decouples StreamOutput from whether a PTY is used. In most cases we just want to see the output in the log window, but don't have to use a PTY, e.g. for the bisect commands. This has the implication that custom commands that are using "stream: true" no longer use a PTY. In most cases that's probably a good thing, but we're going to add a separate pty config for those who really wanted this.
This commit is contained in:
parent
8cf617b683
commit
a199ed1396
2 changed files with 24 additions and 1 deletions
|
@ -238,7 +238,13 @@ func (self *cmdObjRunner) runAndStreamAux(
|
|||
var stderr bytes.Buffer
|
||||
cmd.Stderr = io.MultiWriter(cmdWriter, &stderr)
|
||||
|
||||
handler, err := self.getCmdHandlerPty(cmd)
|
||||
var handler *cmdHandler
|
||||
var err error
|
||||
if cmdObj.ShouldUsePty() {
|
||||
handler, err = self.getCmdHandlerPty(cmd)
|
||||
} else {
|
||||
handler, err = self.getCmdHandlerNonPty(cmd)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue