Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d2e4ce533 | |||
| 9e3960ce9f |
3
.changes/v0.11.5.md
Normal file
3
.changes/v0.11.5.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## v0.11.5 - 2026-02-10
|
||||||
|
### Changed
|
||||||
|
* Command.Type: scriptFile no longer requests psudoterminal
|
||||||
@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.5 - 2026-02-10
|
||||||
|
### Changed
|
||||||
|
* Command.Type: scriptFile no longer requests psudoterminal
|
||||||
|
|
||||||
## v0.11.4 - 2026-02-01
|
## v0.11.4 - 2026-02-01
|
||||||
### Changed
|
### Changed
|
||||||
* Command.[name].output.file: now appends correctly to the beginning of file in an absolute path
|
* Command.[name].output.file: now appends correctly to the beginning of file in an absolute path
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
const versionStr = "0.11.4"
|
const versionStr = "0.11.5"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
versionCmd = &cobra.Command{
|
versionCmd = &cobra.Command{
|
||||||
|
|||||||
@@ -690,18 +690,17 @@ func (command *Command) runScriptFile(session *ssh.Session, cmdCtxLogger, global
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// session.Stdin = script
|
session.Stdin = script
|
||||||
|
|
||||||
modes := ssh.TerminalModes{
|
// modes := ssh.TerminalModes{
|
||||||
ssh.ECHO: 0,
|
// ssh.ECHO: 0,
|
||||||
ssh.ECHOCTL: 0,
|
// ssh.ECHOCTL: 0,
|
||||||
ssh.TTY_OP_ISPEED: 14400,
|
// ssh.TTY_OP_ISPEED: 14400,
|
||||||
ssh.TTY_OP_OSPEED: 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()
|
stdout, stdOutErr := session.StdoutPipe()
|
||||||
if stdOutErr != nil {
|
if stdOutErr != nil {
|
||||||
return nil, fmt.Errorf("error getting stdout pipe: %w", stdOutErr)
|
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
|
LogOutputToFile = true
|
||||||
}
|
}
|
||||||
|
|
||||||
stdin.Write(script.Bytes())
|
|
||||||
|
|
||||||
stdOutput, stdoOutReadErr := io.ReadAll(stdout)
|
stdOutput, stdoOutReadErr := io.ReadAll(stdout)
|
||||||
if err := session.Wait(); err != nil {
|
if err := session.Wait(); err != nil {
|
||||||
stdOutBuff := bytes.NewBuffer(stdOutput)
|
stdOutBuff := bytes.NewBuffer(stdOutput)
|
||||||
|
|||||||
Reference in New Issue
Block a user