Skip to content

Commit

Permalink
use pseudo terminal only when running commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dovholuknf committed Jul 25, 2024
1 parent c1258b0 commit cee713c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zsshlib/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ func RemoteShell(client *ssh.Client, args []string) error {
return err
}

if err := session.RequestPty("xterm", 80, 40, ssh.TerminalModes{}); err != nil {
logrus.Fatalf("Failed to request pseudo terminal: %v", err)
}

if len(args) > 0 {
if err := session.RequestPty("xterm", 80, 40, ssh.TerminalModes{}); err != nil {
logrus.Fatalf("Failed to request pseudo terminal: %v", err)
}

defer func() { _ = session.Close() }()

stdoutPipe, err := session.StdoutPipe()
Expand Down

0 comments on commit cee713c

Please sign in to comment.