Skip to content

Commit a66c513

Browse files
committed
Forces TTY usage for interactive sessions
Ensures consistent interactive experiences by always enabling TTY. Removes checks for non-interactive terminals to streamline usage.
1 parent bb36080 commit a66c513

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

pkg/cli/exec.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"os"
54
"strings"
65

76
"github.com/convox/rack/pkg/options"
@@ -28,10 +27,7 @@ func Exec(rack sdk.Interface, c *stdcli.Context) error {
2827
opts.Height = options.Int(h)
2928
opts.Width = options.Int(w)
3029
}
31-
32-
if !stdcli.IsTerminal(os.Stdin) {
33-
opts.Tty = options.Bool(false)
34-
}
30+
opts.Tty = options.Bool(true)
3531

3632
restore := c.TerminalRaw()
3733
defer restore()

pkg/cli/run.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cli
22

33
import (
44
"fmt"
5-
"os"
65
"strings"
76

87
"github.com/convox/rack/pkg/helpers"
@@ -111,10 +110,7 @@ func Run(rack sdk.Interface, c *stdcli.Context) error {
111110
Width: opts.Width,
112111
}
113112

114-
if !stdcli.IsTerminal(os.Stdin) {
115-
eopts.Tty = options.Bool(false)
116-
}
117-
113+
eopts.Tty = options.Bool(true)
118114
code, err := rack.ProcessExec(app(c), ps.Id, command, c, eopts)
119115
if err != nil {
120116
return err

0 commit comments

Comments
 (0)