From e6ad4813d3ae1ac229aed71c5e609f829f61a25d Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sun, 19 Nov 2023 23:50:45 -0500 Subject: [PATCH] dont crash when redirecting stderr --- progress/bar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progress/bar.go b/progress/bar.go index a8383f5c..f5a2622a 100644 --- a/progress/bar.go +++ b/progress/bar.go @@ -37,7 +37,7 @@ func NewBar(message string, maxValue, initialValue int64) *Bar { func (b *Bar) String() string { termWidth, _, err := term.GetSize(int(os.Stderr.Fd())) if err != nil { - panic(err) + termWidth = 80 } var pre, mid, suf strings.Builder