Skip to content

Commit e03c551

Browse files
committed
fix windows build
1 parent 0eed328 commit e03c551

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

v3/pool_win.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package pb
66
import (
77
"fmt"
88
"log"
9+
"strings"
910

1011
"github.com/cheggaaa/pb/v3/termutil"
1112
)
@@ -30,6 +31,10 @@ func (p *Pool) print(first bool) bool {
3031
log.Panic(err)
3132
}
3233
}
34+
cols, err := termutil.TerminalWidth()
35+
if err != nil {
36+
cols = defaultBarWidth
37+
}
3338
isFinished := true
3439
for _, bar := range p.bars {
3540
if !bar.IsFinished() {

0 commit comments

Comments
 (0)