From 8c4022b06b4ff593439ed8ef29e8362f3844172c Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Mon, 20 Nov 2023 14:33:46 -0500 Subject: [PATCH] fix initial progress stats --- progress/bar.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/progress/bar.go b/progress/bar.go index 97bc15cfb..31fb8aeaa 100644 --- a/progress/bar.go +++ b/progress/bar.go @@ -124,15 +124,14 @@ func (b *Bar) Stats() Stats { switch { case b.statted.IsZero(): - case b.currentValue >= b.maxValue: b.stats = Stats{ - value: b.maxValue, + value: b.initialValue, rate: 0, remaining: 0, } - case b.statted.IsZero(): + case b.currentValue >= b.maxValue: b.stats = Stats{ - value: b.initialValue, + value: b.maxValue, rate: 0, remaining: 0, }