Skip to content

Commit

Permalink
Fix commands that use iostreams RefreshScreen (cli#6607)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcoe authored Nov 14, 2022
1 parent 3fd73ec commit c066edc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/iostreams/iostreams.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (s *IOStreams) SetAlternateScreenBufferEnabled(enabled bool) {
}

func (s *IOStreams) RefreshScreen() {
if s.stdoutIsTTY {
if s.IsStdoutTTY() {
// Move cursor to 0,0
fmt.Fprint(s.Out, "\x1b[0;0H")
// Clear from cursor to bottom of screen
Expand Down Expand Up @@ -407,8 +407,9 @@ func System() *IOStreams {
}

stdoutIsTTY := io.IsStdoutTTY()
stderrIsTTY := io.IsStderrTTY()

if stdoutIsTTY && io.IsStderrTTY() {
if stdoutIsTTY && stderrIsTTY {
io.progressIndicatorEnabled = true
}

Expand Down

0 comments on commit c066edc

Please sign in to comment.