diff --git a/cmd/aws/command.go b/cmd/aws/command.go index 629a86ee5..510ed27d4 100644 --- a/cmd/aws/command.go +++ b/cmd/aws/command.go @@ -10,6 +10,7 @@ import ( "fmt" "github.com/kubefirst/kubefirst/internal/common" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -47,6 +48,14 @@ func NewCommand() *cobra.Command { Use: "aws", Short: "kubefirst aws installation", Long: "kubefirst aws", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("To learn more about aws in kubefirst, run:") + fmt.Println(" kubefirst help") + + if progress.Progress != nil { + progress.Progress.Quit() + } + }, } // wire up new commands diff --git a/cmd/beta.go b/cmd/beta.go index 65405b63c..74cef5164 100644 --- a/cmd/beta.go +++ b/cmd/beta.go @@ -12,6 +12,7 @@ import ( "github.com/kubefirst/kubefirst/cmd/digitalocean" "github.com/kubefirst/kubefirst/cmd/google" "github.com/kubefirst/kubefirst/cmd/vultr" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -23,6 +24,10 @@ var betaCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { fmt.Println("To learn more about kubefirst, run:") fmt.Println(" kubefirst help") + + if progress.Progress != nil { + progress.Progress.Quit() + } }, } diff --git a/cmd/civo/command.go b/cmd/civo/command.go index 59f5c76b2..35322ea13 100644 --- a/cmd/civo/command.go +++ b/cmd/civo/command.go @@ -10,6 +10,7 @@ import ( "fmt" "github.com/kubefirst/kubefirst/internal/common" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -47,6 +48,14 @@ func NewCommand() *cobra.Command { Use: "civo", Short: "kubefirst civo installation", Long: "kubefirst civo", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("To learn more about civo in kubefirst, run:") + fmt.Println(" kubefirst civo --help") + + if progress.Progress != nil { + progress.Progress.Quit() + } + }, } // wire up new commands diff --git a/cmd/digitalocean/command.go b/cmd/digitalocean/command.go index 78d04aa43..e190db841 100644 --- a/cmd/digitalocean/command.go +++ b/cmd/digitalocean/command.go @@ -10,6 +10,7 @@ import ( "fmt" "github.com/kubefirst/kubefirst/internal/common" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -47,6 +48,14 @@ func NewCommand() *cobra.Command { Use: "digitalocean", Short: "kubefirst DigitalOcean installation", Long: "kubefirst digitalocean", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("To learn more about digital ocean in kubefirst, run:") + fmt.Println(" kubefirst beta digitalocean --help") + + if progress.Progress != nil { + progress.Progress.Quit() + } + }, } // on error, doesnt show helper/usage diff --git a/cmd/google/command.go b/cmd/google/command.go index c2e80e1ae..0486b29ac 100644 --- a/cmd/google/command.go +++ b/cmd/google/command.go @@ -10,6 +10,7 @@ import ( "fmt" "github.com/kubefirst/kubefirst/internal/common" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -50,6 +51,14 @@ func NewCommand() *cobra.Command { Use: "google", Short: "kubefirst Google installation", Long: "kubefirst google", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("To learn more about google in kubefirst, run:") + fmt.Println(" kubefirst beta google --help") + + if progress.Progress != nil { + progress.Progress.Quit() + } + }, } // on error, doesnt show helper/usage diff --git a/cmd/k3d/command.go b/cmd/k3d/command.go index 019ba6e82..0658b967b 100644 --- a/cmd/k3d/command.go +++ b/cmd/k3d/command.go @@ -9,6 +9,7 @@ package k3d import ( "fmt" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -46,6 +47,14 @@ func NewCommand() *cobra.Command { Use: "k3d", Short: "kubefirst k3d installation", Long: "kubefirst k3d", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("To learn more about k3d in kubefirst, run:") + fmt.Println(" kubefirst k3d --help") + + if progress.Progress != nil { + progress.Progress.Quit() + } + }, } // wire up new commands diff --git a/cmd/root.go b/cmd/root.go index 5fffbcca8..943ece3c8 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -14,6 +14,7 @@ import ( "github.com/kubefirst/kubefirst/cmd/civo" "github.com/kubefirst/kubefirst/cmd/k3d" "github.com/kubefirst/kubefirst/internal/common" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/kubefirst/runtime/configs" "github.com/kubefirst/runtime/pkg/progressPrinter" @@ -34,6 +35,7 @@ var rootCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { fmt.Println("To learn more about kubefirst, run:") fmt.Println(" kubefirst help") + progress.Progress.Quit() }, } diff --git a/cmd/vultr/command.go b/cmd/vultr/command.go index 99f5d5b1f..ba7efaa43 100644 --- a/cmd/vultr/command.go +++ b/cmd/vultr/command.go @@ -10,6 +10,7 @@ import ( "fmt" "github.com/kubefirst/kubefirst/internal/common" + "github.com/kubefirst/kubefirst/internal/progress" "github.com/spf13/cobra" ) @@ -48,6 +49,14 @@ func NewCommand() *cobra.Command { Use: "vultr", Short: "kubefirst Vultr installation", Long: "kubefirst vultr", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("To learn more about vultr in kubefirst, run:") + fmt.Println(" kubefirst beta vultr --help") + + if progress.Progress != nil { + progress.Progress.Quit() + } + }, } // on error, doesnt show helper/usage