diff options
author | Michael Muré <batolettre@gmail.com> | 2022-12-23 01:48:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 01:48:14 +0100 |
commit | 0a5a0ec1ef4ad98bc2116a953e201f96474941ab (patch) | |
tree | 660a9b17b5247fe2f954bfa814cce3193c5afa23 /commands/webui.go | |
parent | 108518530e822e3bdf59c8bfc333ad0bbe2d5fc8 (diff) | |
parent | 95911100823b5c809225d664de74ad2d64e91972 (diff) | |
download | git-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.tar.gz |
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
Diffstat (limited to 'commands/webui.go')
-rw-r--r-- | commands/webui.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/commands/webui.go b/commands/webui.go index 5fe66aa7..6cbaff78 100644 --- a/commands/webui.go +++ b/commands/webui.go @@ -105,11 +105,27 @@ func runWebUI(env *execenv.Env, opts webUIOptions) error { } mrc := cache.NewMultiRepoCache() - _, err := mrc.RegisterDefaultRepository(env.Repo) + _, events, err := mrc.RegisterDefaultRepository(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) + } + } + } + var errOut io.Writer if opts.logErrors { errOut = env.Err |