From 6fd42a421ea58a4e9e1b6b6bff3f97d1da99d349 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Thu, 5 Aug 2021 17:46:52 +0200 Subject: [PATCH] fix: use ascii chars in progress indicator on win (#459) Signed-off-by: Matej Vasek --- progress/progress.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/progress/progress.go b/progress/progress.go index 75342e74f..e52ef51ff 100644 --- a/progress/progress.go +++ b/progress/progress.go @@ -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