From ed5cb9d6100b41c46115b49d7f2c7ea2eb892dea Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 23 Oct 2020 16:40:20 +0200 Subject: [PATCH] Print error on rebuild command --- accounts/pkg/command/rebuild_index.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/accounts/pkg/command/rebuild_index.go b/accounts/pkg/command/rebuild_index.go index 3f37023619..9cc73ce910 100644 --- a/accounts/pkg/command/rebuild_index.go +++ b/accounts/pkg/command/rebuild_index.go @@ -6,6 +6,7 @@ import ( "github.com/micro/cli/v2" "github.com/micro/go-micro/v2/client/grpc" + merrors "github.com/micro/go-micro/v2/errors" "github.com/owncloud/ocis/accounts/pkg/config" index "github.com/owncloud/ocis/accounts/pkg/proto/v0" ) @@ -22,10 +23,11 @@ func DeleteIndex(cdf *config.Config) *cli.Command { _, err := idxSvc.RebuildIndex(context.Background(), &index.RebuildIndexRequest{}) if err != nil { + fmt.Println(merrors.FromError(err).Detail) return err } - fmt.Print("index rebuilt successfully") + fmt.Println("index rebuilt successfully") return nil }, }