Skip to content

Commit

Permalink
fix: stop execution on binary upload errors
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Sep 20, 2024
1 parent 3ee67dd commit fbfc886
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/cmd/microservices/create/create.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fbfc886

Please sign in to comment.