Skip to content

Commit

Permalink
Merge pull request #156 from talwat/termwidth-fix
Browse files Browse the repository at this point in the history
remove duplicate call of term.GetSize
  • Loading branch information
schollz authored Mar 14, 2023
2 parents 600a7db + 44ece3a commit d5980c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions progressbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -1091,9 +1091,6 @@ var termWidth = func() (width int, err error) {
if err == nil {
return width, nil
}
width, _, err = term.GetSize(int(os.Stderr.Fd()))
if err == nil {
return width, nil
}

return 0, err
}

0 comments on commit d5980c4

Please sign in to comment.