dont crash when redirecting stderr
This commit is contained in:
parent
13ba6df5ab
commit
e6ad4813d3
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue