Skip to content

Commit

Permalink
Use terminal window 256x80 for all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Oct 29, 2023
1 parent 8454c2e commit 9be2f8e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cli/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,18 @@ func runAction(a *recipe.Action, cmdEnv *CommandEnv) error {

// createPTY creates pseudo-terminal
func createPTY(cmd *exec.Cmd) (*PTY, error) {
pty, tty, err := pty.Open()
p, t, err := pty.Open()

if err != nil {
return nil, err
}

cmd.Stdin, cmd.Stdout, cmd.Stderr = tty, tty, tty
cmd.Stdin, cmd.Stdout, cmd.Stderr = t, t, t
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true, Setctty: true}

return &PTY{pty: pty, tty: tty}, nil
pty.Setsize(p, &pty.Winsize{Rows: 80, Cols: 256})

return &PTY{pty: p, tty: t}, nil
}

// outputIOLoop reads data from reader and writes it to output store
Expand Down

0 comments on commit 9be2f8e

Please sign in to comment.