aboutsummaryrefslogtreecommitdiffstats
path: root/commands/execenv/env.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-23 01:48:14 +0100
committerGitHub <noreply@github.com>2022-12-23 01:48:14 +0100
commit0a5a0ec1ef4ad98bc2116a953e201f96474941ab (patch)
tree660a9b17b5247fe2f954bfa814cce3193c5afa23 /commands/execenv/env.go
parent108518530e822e3bdf59c8bfc333ad0bbe2d5fc8 (diff)
parent95911100823b5c809225d664de74ad2d64e91972 (diff)
downloadgit-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.tar.gz
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
Diffstat (limited to 'commands/execenv/env.go')
-rw-r--r--commands/execenv/env.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/commands/execenv/env.go b/commands/execenv/env.go
index a63f835a..4c6ce204 100644
--- a/commands/execenv/env.go
+++ b/commands/execenv/env.go
@@ -128,11 +128,28 @@ func LoadBackend(env *Env) func(*cobra.Command, []string) error {
return err
}
- env.Backend, err = cache.NewRepoCache(env.Repo)
+ var events chan cache.BuildEvent
+ env.Backend, events, err = cache.NewRepoCache(env.Repo)
if err != nil {
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)
+ }
+ }
+ }
+
cleaner := func(env *Env) interrupt.CleanerFunc {
return func() error {
if env.Backend != nil {