From b27958758fe59f3c984243f4ad3cb8bcb4f43e86 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 27 Dec 2022 19:39:09 +0100 Subject: cache: simplify cache building events handling --- commands/execenv/env.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'commands/execenv/env.go') diff --git a/commands/execenv/env.go b/commands/execenv/env.go index d30a8db4..9b71a45a 100644 --- a/commands/execenv/env.go +++ b/commands/execenv/env.go @@ -129,15 +129,11 @@ func LoadBackend(env *Env) func(*cobra.Command, []string) error { } var events chan cache.BuildEvent - env.Backend, events, err = cache.NewRepoCache(env.Repo) - if err != nil { - return err - } + env.Backend, events = cache.NewRepoCache(env.Repo) for event := range events { if event.Err != nil { - env.Err.Printf("Cache building error [%s]: %v\n", event.Typename, event.Err) - continue + return event.Err } switch event.Event { case cache.BuildEventCacheIsBuilt: -- cgit