aboutsummaryrefslogtreecommitdiffstats
path: root/commands/execenv/env.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-27 11:19:45 +0100
committerMichael Muré <batolettre@gmail.com>2022-12-27 11:19:45 +0100
commit13a7a5991761eefc00facdc0c7dbc3eb150d6959 (patch)
treeb96a90acf330f4172e6c0ba935b6599f2a1aa9f8 /commands/execenv/env.go
parentf94616ec76e01145a7b2b90c11b27a25d4a4be96 (diff)
downloadgit-bug-13a7a5991761eefc00facdc0c7dbc3eb150d6959.tar.gz
cache: tie the last printf in an event to make the core print free
Diffstat (limited to 'commands/execenv/env.go')
-rw-r--r--commands/execenv/env.go25
1 files changed, 12 insertions, 13 deletions
diff --git a/commands/execenv/env.go b/commands/execenv/env.go
index 4c6ce204..d30a8db4 100644
--- a/commands/execenv/env.go
+++ b/commands/execenv/env.go
@@ -134,19 +134,18 @@ func LoadBackend(env *Env) func(*cobra.Command, []string) error {
return err
}
- if events != nil {
- env.Err.Println("Building cache... ")
- for event := range events {
- if event.Err != nil {
- env.Err.Printf("Cache building error [%s]: %v\n", event.Typename, event.Err)
- continue
- }
- switch event.Event {
- case cache.BuildEventStarted:
- env.Err.Printf("[%s] started\n", event.Typename)
- case cache.BuildEventFinished:
- env.Err.Printf("[%s] done\n", event.Typename)
- }
+ for event := range events {
+ if event.Err != nil {
+ env.Err.Printf("Cache building error [%s]: %v\n", event.Typename, event.Err)
+ continue
+ }
+ switch event.Event {
+ case cache.BuildEventCacheIsBuilt:
+ env.Err.Println("Building cache... ")
+ case cache.BuildEventStarted:
+ env.Err.Printf("[%s] started\n", event.Typename)
+ case cache.BuildEventFinished:
+ env.Err.Printf("[%s] done\n", event.Typename)
}
}