mirror of https://github.com/knative/func.git
fix: use ascii chars in progress indicator on win (#459)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
parent
818ec572aa
commit
6fd42a421e
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -228,6 +229,9 @@ func (b *Bar) spin(ch <-chan time.Time) {
|
||||||
"🕙 ",
|
"🕙 ",
|
||||||
"🕚 ",
|
"🕚 ",
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
spinner = []string{"|", "/", "-", "\\"}
|
||||||
|
}
|
||||||
idx := 0
|
idx := 0
|
||||||
for range ch {
|
for range ch {
|
||||||
// Writes the spinner frame at the beginning of the previous line, moving
|
// Writes the spinner frame at the beginning of the previous line, moving
|
||||||
|
|
Loading…
Reference in New Issue