Преглед изворни кода

passthrough everything to porter kubectl and porter helm

Mohammed Nafees пре 3 година
родитељ
комит
b9ce9d62c0
2 измењених фајлова са 9 додато и 5 уклоњено
  1. 4 2
      cli/cmd/helm.go
  2. 5 3
      cli/cmd/kubectl.go

+ 4 - 2
cli/cmd/helm.go

@@ -11,8 +11,10 @@ import (
 )
 
 var helmCmd = &cobra.Command{
-	Use:   "helm",
-	Short: "Use helm to interact with a Porter cluster",
+	Use:                   "helm",
+	Short:                 "Use helm to interact with a Porter cluster",
+	DisableFlagParsing:    true,
+	DisableFlagsInUseLine: true,
 	Run: func(cmd *cobra.Command, args []string) {
 		err := checkLoginAndRun(args, runHelm)
 

+ 5 - 3
cli/cmd/kubectl.go

@@ -12,8 +12,10 @@ import (
 )
 
 var kubectlCmd = &cobra.Command{
-	Use:   "kubectl",
-	Short: "Use kubectl to interact with a Porter cluster",
+	Use:                   "kubectl",
+	Short:                 "Use kubectl to interact with a Porter cluster",
+	DisableFlagParsing:    true,
+	DisableFlagsInUseLine: true,
 	Run: func(cmd *cobra.Command, args []string) {
 		err := checkLoginAndRun(args, runKubectl)
 
@@ -54,7 +56,7 @@ func runKubectl(_ *types.GetAuthenticatedUserResponse, client *api.Client, args
 	err = cmd.Run()
 
 	if err != nil {
-		return fmt.Errorf("error running helm: %w", err)
+		return fmt.Errorf("error running kubectl: %w", err)
 	}
 
 	return nil