Skip to content

Commit a3f0937

Browse files
committed
Revert "feat: provide read from stdin"
This reverts commit 2674cbc.
1 parent 2674cbc commit a3f0937

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

cmd/main.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package main
1616

1717
import (
18-
"bufio"
1918
"fmt"
2019
"os"
2120
"path/filepath"
@@ -53,32 +52,6 @@ var (
5352
os.Exit(1)
5453
}
5554

56-
stat, _ := os.Stdin.Stat()
57-
if (stat.Mode() & os.ModeCharDevice) == 0 {
58-
f, err := os.CreateTemp("", "tmpfile-")
59-
if err != nil {
60-
log.Fatal(err)
61-
}
62-
63-
// close and remove the temporary file at the end of the program
64-
defer f.Close()
65-
defer os.Remove(f.Name())
66-
67-
// write data to the temporary file
68-
reader := bufio.NewScanner(os.Stdin)
69-
for reader.Scan() {
70-
text := reader.Text()
71-
if _, err := f.WriteString(text); err != nil {
72-
log.Fatal(err)
73-
}
74-
}
75-
76-
sshConfigFile = f.Name()
77-
if err != nil {
78-
log.Fatal(err)
79-
}
80-
}
81-
8255
if sshConfigFile == "" {
8356
sshConfigFile = filepath.Join(home, ".ssh", "config")
8457
}

internal/core/services/server_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (s *serverService) SetPinned(alias string, pinned bool) error {
156156
// SSH starts an interactive SSH session to the given alias using the system's ssh client.
157157
func (s *serverService) SSH(alias string) error {
158158
s.logger.Infow("ssh start", "alias", alias)
159-
cmd := exec.Command("ssh", "-tt", alias)
159+
cmd := exec.Command("ssh", alias)
160160
cmd.Stdin = os.Stdin
161161
cmd.Stdout = os.Stdout
162162
cmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)