Skip to content

Commit

Permalink
fix: use ascii chars in progress indicator on win (#459)
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <mvasek@redhat.com>
  • Loading branch information
matejvasek committed Aug 5, 2021
1 parent 818ec57 commit 6fd42a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io"
"os"
"runtime"
"time"
)

Expand Down Expand Up @@ -228,6 +229,9 @@ func (b *Bar) spin(ch <-chan time.Time) {
"🕙 ",
"🕚 ",
}
if runtime.GOOS == "windows" {
spinner = []string{"|", "/", "-", "\\"}
}
idx := 0
for range ch {
// Writes the spinner frame at the beginning of the previous line, moving
Expand Down

0 comments on commit 6fd42a4

Please sign in to comment.