aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/execenv/env.go8
-rw-r--r--commands/webui.go16
2 files changed, 19 insertions, 5 deletions
diff --git a/commands/execenv/env.go b/commands/execenv/env.go
index 4b353279..0813ab7e 100644
--- a/commands/execenv/env.go
+++ b/commands/execenv/env.go
@@ -135,20 +135,20 @@ func LoadBackend(env *Env) func(*cobra.Command, []string) error {
}
if events != nil {
- _, _ = fmt.Fprintln(os.Stderr, "Building cache... ")
+ env.Err.Println("Building cache... ")
}
for event := range events {
if event.Err != nil {
- _, _ = fmt.Fprintf(os.Stderr, "Cache building error [%s]: %v\n", event.Typename, event.Err)
+ env.Err.Printf("Cache building error [%s]: %v\n", event.Typename, event.Err)
continue
}
switch event.Event {
case cache.BuildEventStarted:
- _, _ = fmt.Fprintf(os.Stderr, "[%s] started\n", event.Typename)
+ env.Err.Printf("[%s] started\n", event.Typename)
case cache.BuildEventFinished:
- _, _ = fmt.Fprintf(os.Stderr, "[%s] done\n", event.Typename)
+ env.Err.Printf("[%s] done\n", event.Typename)
}
}
diff --git a/commands/webui.go b/commands/webui.go
index e1e0fc2b..4f7a02b5 100644
--- a/commands/webui.go
+++ b/commands/webui.go
@@ -105,11 +105,25 @@ 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
}
+ 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