diff options
author | Michael Muré <batolettre@gmail.com> | 2022-12-27 11:19:45 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-12-27 11:19:45 +0100 |
commit | 13a7a5991761eefc00facdc0c7dbc3eb150d6959 (patch) | |
tree | b96a90acf330f4172e6c0ba935b6599f2a1aa9f8 /commands/execenv/env.go | |
parent | f94616ec76e01145a7b2b90c11b27a25d4a4be96 (diff) | |
download | git-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.go | 25 |
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) } } |