From 989a6c1539480a27117b666d7256876a28bc1a5f Mon Sep 17 00:00:00 2001 From: Uwe Krueger Date: Sun, 16 Jun 2024 14:36:11 +0200 Subject: [PATCH] fix https://github.com/open-component-model/ocm-project/issues/196 --- cmds/ocm/commands/ocmcmds/components/transfer/cmd.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmds/ocm/commands/ocmcmds/components/transfer/cmd.go b/cmds/ocm/commands/ocmcmds/components/transfer/cmd.go index 028ecc177b..30aa49688e 100644 --- a/cmds/ocm/commands/ocmcmds/components/transfer/cmd.go +++ b/cmds/ocm/commands/ocmcmds/components/transfer/cmd.go @@ -186,7 +186,11 @@ func (a *action) Close() error { func (a *action) Out() error { a.printer.Printf("%d versions transferred\n", len(a.closure)) if a.errors.Result() != nil { - return fmt.Errorf("transfer finished with %d error(s)", a.errors.Len()) + sum := "Error summary:" + for _, e := range a.errors.Entries() { + sum = fmt.Sprintf("%s\n- %s", sum, e) + } + return fmt.Errorf("transfer finished with %d error(s)\n%s\n", a.errors.Len(), sum) } if a.cmd.BOMFile != "" {