From c6458720e91d694a3aca3a7d0a6ed9032cddb85d Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Mon, 17 Oct 2022 12:23:06 -0700 Subject: [PATCH] Handle error events in itctl res load command (#29) --- cmd/itctl/resources.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/itctl/resources.go b/cmd/itctl/resources.go index 2e5338e..2600ef5 100644 --- a/cmd/itctl/resources.go +++ b/cmd/itctl/resources.go @@ -35,6 +35,10 @@ func resLoad(ctx context.Context, args []string) error { } for evt := range progCh { + if evt.Err != nil { + return evt.Err + } + if evt.Operation == infinitime.ResourceOperationRemoveObsolete { bar.SetTemplateString(rmTmpl) bar.Set("filename", evt.Name)