diff --git a/.changes/unreleased/Changed-20260210-115903.yaml b/.changes/unreleased/Changed-20260210-115903.yaml new file mode 100644 index 0000000..31f856b --- /dev/null +++ b/.changes/unreleased/Changed-20260210-115903.yaml @@ -0,0 +1,3 @@ +kind: Changed +body: 'Command.Type: scriptFile no longer requests psudoterminal' +time: 2026-02-10T11:59:03.24953839-06:00 diff --git a/cmd/version.go b/cmd/version.go index c7de20c..fe8bb3c 100755 --- a/cmd/version.go +++ b/cmd/version.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" ) -const versionStr = "0.11.4" +const versionStr = "0.11.5" var ( versionCmd = &cobra.Command{ diff --git a/pkg/backy/ssh.go b/pkg/backy/ssh.go index 7fc5119..1b6e721 100755 --- a/pkg/backy/ssh.go +++ b/pkg/backy/ssh.go @@ -690,18 +690,17 @@ func (command *Command) runScriptFile(session *ssh.Session, cmdCtxLogger, global if err != nil { return nil, err } - // session.Stdin = script + session.Stdin = script - modes := ssh.TerminalModes{ - ssh.ECHO: 0, - ssh.ECHOCTL: 0, - ssh.TTY_OP_ISPEED: 14400, - ssh.TTY_OP_OSPEED: 14400, - } + // modes := ssh.TerminalModes{ + // ssh.ECHO: 0, + // ssh.ECHOCTL: 0, + // ssh.TTY_OP_ISPEED: 14400, + // ssh.TTY_OP_OSPEED: 14400, + // } - session.RequestPty("xterm", 80, 40, modes) + // session.RequestPty("xterm", 80, 40, modes) - stdin, _ := session.StdinPipe() stdout, stdOutErr := session.StdoutPipe() if stdOutErr != nil { return nil, fmt.Errorf("error getting stdout pipe: %w", stdOutErr) @@ -718,8 +717,6 @@ func (command *Command) runScriptFile(session *ssh.Session, cmdCtxLogger, global LogOutputToFile = true } - stdin.Write(script.Bytes()) - stdOutput, stdoOutReadErr := io.ReadAll(stdout) if err := session.Wait(); err != nil { stdOutBuff := bytes.NewBuffer(stdOutput)