Skip to content

Commit

Permalink
fix(cmx): addon create object-store error masked (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh authored May 3, 2024
1 parent d091fc7 commit 6400ea4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 5 additions & 2 deletions cli/cmd/cluster_addon_create_objectstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ func (r *runners) InitClusterAddonCreateObjectStore(parent *cobra.Command) *cobr
}
parent.AddCommand(cmd)

_ = clusterAddonCreateObjectStoreFlags(cmd, &args)
err := clusterAddonCreateObjectStoreFlags(cmd, &args)
if err != nil {
panic(err)
}

return cmd
}

func clusterAddonCreateObjectStoreFlags(cmd *cobra.Command, args *clusterAddonCreateObjectStoreArgs) error {
cmd.Flags().StringVar(&args.objectStoreBucket, "bucket-prefix", "", "A prefix for the bucket name to be created (required)")
err := cmd.MarkFlagRequired("bucket")
err := cmd.MarkFlagRequired("bucket-prefix")
if err != nil {
return err
}
Expand Down
5 changes: 4 additions & 1 deletion cli/cmd/cluster_addon_create_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ func (r *runners) InitClusterAddonCreatePostgres(parent *cobra.Command) *cobra.C
}
parent.AddCommand(cmd)

_ = clusterAddonCreatePostgresFlags(cmd, &args)
err := clusterAddonCreatePostgresFlags(cmd, &args)
if err != nil {
panic(err)
}

return cmd
}
Expand Down
5 changes: 4 additions & 1 deletion cli/cmd/cluster_addon_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ func (r *runners) InitClusterAddonLs(parent *cobra.Command) *cobra.Command {
}
parent.AddCommand(cmd)

_ = clusterAddonLsFlags(cmd, &args)
err := clusterAddonLsFlags(cmd, &args)
if err != nil {
panic(err)
}

return cmd
}
Expand Down
5 changes: 4 additions & 1 deletion cli/cmd/cluster_addon_rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ func (r *runners) InitClusterAddonRm(parent *cobra.Command) *cobra.Command {
}
parent.AddCommand(cmd)

_ = clusterAddonRmFlags(cmd, &args)
err := clusterAddonRmFlags(cmd, &args)
if err != nil {
panic(err)
}

return cmd
}
Expand Down

0 comments on commit 6400ea4

Please sign in to comment.