From 6400ea462086aab29e5760a6264be7356fa33235 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Fri, 3 May 2024 08:18:15 -0700 Subject: [PATCH] fix(cmx): addon create object-store error masked (#384) --- cli/cmd/cluster_addon_create_objectstore.go | 7 +++++-- cli/cmd/cluster_addon_create_postgres.go | 5 ++++- cli/cmd/cluster_addon_ls.go | 5 ++++- cli/cmd/cluster_addon_rm.go | 5 ++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/cli/cmd/cluster_addon_create_objectstore.go b/cli/cmd/cluster_addon_create_objectstore.go index c155a3e2..f0646394 100644 --- a/cli/cmd/cluster_addon_create_objectstore.go +++ b/cli/cmd/cluster_addon_create_objectstore.go @@ -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 } diff --git a/cli/cmd/cluster_addon_create_postgres.go b/cli/cmd/cluster_addon_create_postgres.go index 4405e08a..7709a3a7 100644 --- a/cli/cmd/cluster_addon_create_postgres.go +++ b/cli/cmd/cluster_addon_create_postgres.go @@ -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 } diff --git a/cli/cmd/cluster_addon_ls.go b/cli/cmd/cluster_addon_ls.go index 0d037ef9..621fe76a 100644 --- a/cli/cmd/cluster_addon_ls.go +++ b/cli/cmd/cluster_addon_ls.go @@ -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 } diff --git a/cli/cmd/cluster_addon_rm.go b/cli/cmd/cluster_addon_rm.go index 56752d54..9e8a0515 100644 --- a/cli/cmd/cluster_addon_rm.go +++ b/cli/cmd/cluster_addon_rm.go @@ -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 }