Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cli/cmd/customer_create.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ func (r *runners) InitCustomersCreateCommand(parent *cobra.Command) *cobra.Comma
Long: `create a customer`,
RunE: r.createCustomer,
SilenceUsage: false,
SilenceErrors: true, // this command uses custom error printing
SilenceErrors: false,
}
parent.AddCommand(cmd)
cmd.Flags().StringVar(&r.args.customerCreateName, "name", "", "Name of the customer")
@@ -48,6 +48,8 @@ func (r *runners) InitCustomersCreateCommand(parent *cobra.Command) *cobra.Comma
}

func (r *runners) createCustomer(cmd *cobra.Command, _ []string) (err error) {
cmd.SilenceErrors = true // this command uses custom error printing

defer func() {
printIfError(cmd, err)
}()
4 changes: 3 additions & 1 deletion cli/cmd/customer_update.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ func (r *runners) InitCustomerUpdateCommand(parent *cobra.Command) *cobra.Comman
Long: `update a customer`,
RunE: r.updateCustomer,
SilenceUsage: false,
SilenceErrors: true, // this command uses custom error printing
SilenceErrors: false,
}
parent.AddCommand(cmd)
cmd.Flags().StringVar(&r.args.customerUpdateID, "customer", "", "The ID of the customer to update")
@@ -50,6 +50,8 @@ func (r *runners) InitCustomerUpdateCommand(parent *cobra.Command) *cobra.Comman
}

func (r *runners) updateCustomer(cmd *cobra.Command, _ []string) (err error) {
cmd.SilenceErrors = true // this command uses custom error printing

defer func() {
printIfError(cmd, err)
}()
4 changes: 3 additions & 1 deletion cli/cmd/instance_inspect.go
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ func (r *runners) InitInstanceInspectCommand(parent *cobra.Command) *cobra.Comma
Long: `Show full details for a customer instance`,
RunE: r.inspectInstance,
SilenceUsage: false,
SilenceErrors: true, // this command uses custom error printing
SilenceErrors: false,
}
parent.AddCommand(cmd)
cmd.Flags().StringVar(&r.args.instanceInspectCustomer, "customer", "", "Customer Name or ID")
@@ -25,6 +25,8 @@ func (r *runners) InitInstanceInspectCommand(parent *cobra.Command) *cobra.Comma
}

func (r *runners) inspectInstance(cmd *cobra.Command, _ []string) (err error) {
cmd.SilenceErrors = true // this command uses custom error printing

defer func() {
printIfError(cmd, err)
}()
4 changes: 3 additions & 1 deletion cli/cmd/instance_ls.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ func (r *runners) InitInstanceLSCommand(parent *cobra.Command) *cobra.Command {
Long: `list customer instances`,
RunE: r.listInstances,
SilenceUsage: false,
SilenceErrors: true, // this command uses custom error printing
SilenceErrors: false,
}

parent.AddCommand(cmd)
@@ -25,6 +25,8 @@ func (r *runners) InitInstanceLSCommand(parent *cobra.Command) *cobra.Command {
}

func (r *runners) listInstances(cmd *cobra.Command, _ []string) (err error) {
cmd.SilenceErrors = true // this command uses custom error printing

defer func() {
printIfError(cmd, err)
}()
4 changes: 3 additions & 1 deletion cli/cmd/release_create.go
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ func (r *runners) InitReleaseCreate(parent *cobra.Command) error {
Long: `Create a new release by providing YAML configuration for the next release in
your sequence.`,
SilenceUsage: false,
SilenceErrors: true, // this command uses custom error printing
SilenceErrors: false,
}

parent.AddCommand(cmd)
@@ -154,6 +154,8 @@ func (r *runners) setKOTSDefaultReleaseParams() error {
}

func (r *runners) releaseCreate(cmd *cobra.Command, args []string) (err error) {
cmd.SilenceErrors = true // this command uses custom error printing

defer func() {
printIfError(cmd, err)
}()
4 changes: 3 additions & 1 deletion cli/cmd/release_promote.go
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ func (r *runners) InitReleasePromote(parent *cobra.Command) {
Long: `Set the release for a channel

Example: replicated release promote 15 fe4901690971757689f022f7a460f9b2`,
SilenceErrors: true, // this command uses custom error printing
SilenceErrors: false,
}

parent.AddCommand(cmd)
@@ -30,6 +30,8 @@ func (r *runners) InitReleasePromote(parent *cobra.Command) {
}

func (r *runners) releasePromote(cmd *cobra.Command, args []string) (err error) {
cmd.SilenceErrors = true // this command uses custom error printing

defer func() {
printIfError(cmd, err)
}()