aboutsummaryrefslogtreecommitdiffstats
path: root/commands/execenv
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-03-18 21:13:27 +0100
committerMichael Muré <batolettre@gmail.com>2023-03-18 21:13:27 +0100
commit281d4a642d87a23ed62045db899ff967abf8b818 (patch)
tree97b4436d20983874925a864d33223f4d9a541bef /commands/execenv
parent56202ec0c2da653239988b2e13f5a323210d8ab3 (diff)
downloadgit-bug-281d4a642d87a23ed62045db899ff967abf8b818.tar.gz
execenv: fix some cache building progress bar artifact
Still one issue remaining: the last bar doesn't dissapear. Looks like a mbp issue.
Diffstat (limited to 'commands/execenv')
-rw-r--r--commands/execenv/loading.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/execenv/loading.go b/commands/execenv/loading.go
index 2263f700..7838ea6a 100644
--- a/commands/execenv/loading.go
+++ b/commands/execenv/loading.go
@@ -156,13 +156,17 @@ func CacheBuildProgressBar(env *Env, events chan cache.BuildEvent) error {
mpb.AppendDecorators(decor.Percentage(decor.WCSyncSpace)),
)
case cache.BuildEventProgress:
- bars[event.Typename].SetTotal(event.Total, false)
bars[event.Typename].SetCurrent(event.Progress)
+ bars[event.Typename].SetTotal(event.Total, event.Progress == event.Total)
+ case cache.BuildEventFinished:
+ if bar := bars[event.Typename]; !bar.Completed() {
+ bar.SetTotal(0, true)
+ }
}
}
if progress != nil {
- progress.Shutdown()
+ progress.Wait()
}
return nil