Skip to content

Commit

Permalink
Fix run with sudo for functionality commands (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
berkayoz authored Mar 4, 2024
1 parent b81e215 commit c24902b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/k8s/cmd/k8s/k8s_disable.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

func newDisableCmd() *cobra.Command {
disableCmd := &cobra.Command{
Use: "disable <functionality>",
Short: "Disable a specific functionality in the cluster",
Long: fmt.Sprintf("Disable one of the specific functionalities: %s.", strings.Join(componentList, ",")),
PersistentPreRunE: chainPreRunHooks(hookSetupClient),
Use: "disable <functionality>",
Short: "Disable a specific functionality in the cluster",
Long: fmt.Sprintf("Disable one of the specific functionalities: %s.", strings.Join(componentList, ",")),
PreRunE: chainPreRunHooks(hookSetupClient),
RunE: func(cmd *cobra.Command, args []string) (err error) {
defer errors.Transform(&err, nil)

Expand Down
8 changes: 4 additions & 4 deletions src/k8s/cmd/k8s/k8s_enable.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ var (

func newEnableCmd() *cobra.Command {
enableCmd := &cobra.Command{
Use: "enable <functionality>",
Short: "Enable a specific functionality in the cluster",
Long: fmt.Sprintf("Enable one of the specific functionalities: %s.", strings.Join(componentList, ", ")),
PersistentPreRunE: chainPreRunHooks(hookSetupClient),
Use: "enable <functionality>",
Short: "Enable a specific functionality in the cluster",
Long: fmt.Sprintf("Enable one of the specific functionalities: %s.", strings.Join(componentList, ", ")),
PreRunE: chainPreRunHooks(hookSetupClient),
RunE: func(cmd *cobra.Command, args []string) (err error) {
defer errors.Transform(&err, nil)

Expand Down
8 changes: 4 additions & 4 deletions src/k8s/cmd/k8s/k8s_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

func newGetCmd() *cobra.Command {
getCmd := &cobra.Command{
Use: "get <functionality.key>",
Short: "get functionality configuration",
PersistentPreRunE: chainPreRunHooks(hookSetupClient),
Args: cobra.ExactArgs(1),
Use: "get <functionality.key>",
Short: "get functionality configuration",
PreRunE: chainPreRunHooks(hookSetupClient),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
defer errors.Transform(&err, nil)

Expand Down
8 changes: 4 additions & 4 deletions src/k8s/cmd/k8s/k8s_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

func newSetCmd() *cobra.Command {
setCmd := &cobra.Command{
Use: "set <functionality.key=value>...",
Short: "Set functionality configuration",
PersistentPreRunE: chainPreRunHooks(hookSetupClient),
Args: cobra.ArbitraryArgs,
Use: "set <functionality.key=value>...",
Short: "Set functionality configuration",
PreRunE: chainPreRunHooks(hookSetupClient),
Args: cobra.ArbitraryArgs,
RunE: func(cmd *cobra.Command, args []string) (err error) {
defer errors.Transform(&err, nil)

Expand Down

0 comments on commit c24902b

Please sign in to comment.