From fbfc886233d343618bd1869e3c475bb844cf8939 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Fri, 20 Sep 2024 09:04:49 +0200 Subject: [PATCH] fix: stop execution on binary upload errors --- .../createhostedapplication/createHostedApplication.manual.go | 3 +-- pkg/cmd/microservices/create/create.manual.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go b/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go index 8752cded1..b64149353 100644 --- a/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go +++ b/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go @@ -316,8 +316,7 @@ func (n *CmdCreateHostedApplication) RunE(cmd *cobra.Command, args []string) err n.factory.IOStreams.WaitForProgressIndicator() if err != nil { - // handle error - n.SubCommand.GetCommand().PrintErrf("failed to upload file. %s", err) + return fmt.Errorf("failed to upload file. path=%s, err=%s", zipfile, err) } else { applicationBinaryID = resp.JSON("id").String() } diff --git a/pkg/cmd/microservices/create/create.manual.go b/pkg/cmd/microservices/create/create.manual.go index 9ba0f1e68..edb6282a9 100644 --- a/pkg/cmd/microservices/create/create.manual.go +++ b/pkg/cmd/microservices/create/create.manual.go @@ -281,8 +281,7 @@ func (n *CmdCreate) RunE(cmd *cobra.Command, args []string) error { n.factory.IOStreams.WaitForProgressIndicator() if err != nil { - // handle error - n.SubCommand.GetCommand().PrintErrf("failed to upload file. %s", err) + return fmt.Errorf("failed to upload file. path=%s, err=%s", n.file, err) } } } else {