From 44ece3a4d7682ae9e61090f995974f5b36a995a9 Mon Sep 17 00:00:00 2001 From: Tal <83217276+talwat@users.noreply.github.com> Date: Tue, 28 Feb 2023 18:02:10 +0100 Subject: [PATCH] remove duplicate call of term.GetSize --- progressbar.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/progressbar.go b/progressbar.go index 1c37d30..314654a 100644 --- a/progressbar.go +++ b/progressbar.go @@ -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 }