diff --git a/cmd/cloud/apps/deploy.go b/cmd/cloud/apps/deploy.go index 2f909c2..6b4447d 100644 --- a/cmd/cloud/apps/deploy.go +++ b/cmd/cloud/apps/deploy.go @@ -161,7 +161,7 @@ func (c *DeployCtrl) waitRunCompletion(cmd *cobra.Command) error { c.store.logs = l.ReadLogsResponse.Data - return fmt.Errorf("deployment failed: %s", c.store.ID) + return nil default: continue } @@ -170,9 +170,11 @@ func (c *DeployCtrl) waitRunCompletion(cmd *cobra.Command) error { } func (c *DeployCtrl) Render(cmd *cobra.Command, args []string) error { - if c.store.Run.Status == "errored" && len(c.store.logs) > 0 { - if err := printer.RenderLogs(cmd.ErrOrStderr(), c.store.logs); err != nil { - return err + if c.store.Run.Status == "errored" { + if len(c.store.logs) > 0 { + if err := printer.RenderLogs(cmd.ErrOrStderr(), c.store.logs); err != nil { + return err + } } return fmt.Errorf("deployment failed: %s", c.store.ID) } diff --git a/cmd/cloud/organizations/create.go b/cmd/cloud/organizations/create.go index ffa3fa4..a3e2485 100644 --- a/cmd/cloud/organizations/create.go +++ b/cmd/cloud/organizations/create.go @@ -55,7 +55,7 @@ func (c *CreateController) Run(cmd *cobra.Command, args []string) (fctl.Renderab return nil, err } - _, apiClient, err := fctl.NewMembershipClientForOrganizationFromFlags(cmd, relyingParty, fctl.NewPTermDialog(), profileName, *profile) + apiClient, err := fctl.NewMembershipClient(cmd, relyingParty, fctl.NewPTermDialog(), profileName, *profile) if err != nil { return nil, err } diff --git a/cmd/cloud/organizations/invitations/root.go b/cmd/cloud/organizations/invitations/root.go index 454e336..ce67056 100644 --- a/cmd/cloud/organizations/invitations/root.go +++ b/cmd/cloud/organizations/invitations/root.go @@ -7,7 +7,7 @@ import ( ) func NewCommand() *cobra.Command { - return fctl.NewStackCommand("invitations", + return fctl.NewMembershipCommand("invitations", fctl.WithAliases("invit", "inv", "i", "invitation"), fctl.WithShortDescription("Invitations management"), fctl.WithChildCommands( diff --git a/cmd/cloud/organizations/root.go b/cmd/cloud/organizations/root.go index 8522ecd..cd32568 100644 --- a/cmd/cloud/organizations/root.go +++ b/cmd/cloud/organizations/root.go @@ -13,7 +13,7 @@ import ( ) func NewCommand() *cobra.Command { - return fctl.NewStackCommand("organizations", + return fctl.NewCommand("organizations", fctl.WithAliases("org", "o", "organization"), fctl.WithShortDescription("Organizations management"), fctl.WithChildCommands(