Skip to content

Commit 7594c51

Browse files
committed
fix: flickering on powershell
1 parent 1a5d483 commit 7594c51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

progressbar.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"net/http"
1111
"os"
1212
"regexp"
13+
"runtime"
1314
"strings"
1415
"sync"
1516
"time"
@@ -1373,6 +1374,9 @@ func clearProgressBar(c config, s state) error {
13731374
// fill the empty content
13741375
// to overwrite the progress bar and jump
13751376
// back to the beginning of the line
1377+
if runtime.GOOS == "windows" {
1378+
return writeString(c, "\r")
1379+
}
13761380
str := fmt.Sprintf("\r%s\r", strings.Repeat(" ", s.maxLineWidth))
13771381
return writeString(c, str)
13781382
// the following does not show correctly if the previous line is longer than subsequent line

0 commit comments

Comments
 (0)