fix: use ascii chars in progress indicator on win (#459)

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2021-08-05 17:46:52 +02:00 committed by GitHub
parent 818ec572aa
commit 6fd42a421e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"io"
"os"
"runtime"
"time"
)
@ -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