From ad6f926712c89fa59a0aabe6ba552fde38b68c71 Mon Sep 17 00:00:00 2001 From: CristhianF7 Date: Thu, 1 Aug 2024 18:10:01 -0500 Subject: [PATCH] chore: print cluster name --- internal/common/common.go | 2 ++ internal/progress/message.go | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/internal/common/common.go b/internal/common/common.go index 0026fe9e8..8ff847007 100644 --- a/internal/common/common.go +++ b/internal/common/common.go @@ -102,6 +102,8 @@ func versionCheck() (res *CheckResponse, skip bool) { func GetRootCredentials(cmd *cobra.Command, args []string) error { clusterName := viper.GetString("flags.cluster-name") + fmt.Print(clusterName) + cluster, err := cluster.GetCluster(clusterName) if err != nil { progress.Error(err.Error()) diff --git a/internal/progress/message.go b/internal/progress/message.go index c153e2a1a..4c4c1fb5a 100644 --- a/internal/progress/message.go +++ b/internal/progress/message.go @@ -74,7 +74,7 @@ func DisplayLogHints(estimatedTime int) { headerMessage := renderMessage(header) if !CanRunBubbleTea { - fmt.Print(headerMessage) + fmt.Println(headerMessage) return } @@ -159,7 +159,7 @@ func DisplaySuccessMessage(cluster types.Cluster) successMsg { successMessage := renderMessage(success) if !CanRunBubbleTea { - fmt.Print(successMessage) + fmt.Println(successMessage) return successMsg{} } @@ -188,7 +188,7 @@ func DisplayCredentials(cluster types.Cluster) { headerMessage := renderMessage(header) if !CanRunBubbleTea { - fmt.Print(headerMessage) + fmt.Println(headerMessage) return } @@ -202,7 +202,7 @@ func DisplayCredentials(cluster types.Cluster) { func AddStep(message string) { renderedMessage := createStep(fmt.Sprintf("%s %s", ":dizzy:", message)) if !CanRunBubbleTea { - fmt.Print(renderedMessage) + fmt.Println(renderedMessage) return } @@ -211,7 +211,7 @@ func AddStep(message string) { func CompleteStep(message string) { if !CanRunBubbleTea { - fmt.Print(message) + fmt.Println(message) return } @@ -224,7 +224,7 @@ func Success(success string) { successMessage := renderMessage(success) if !CanRunBubbleTea { - fmt.Print(successMessage) + fmt.Println(successMessage) return } @@ -238,7 +238,7 @@ func Error(message string) { renderedMessage := createErrorLog(message) if !CanRunBubbleTea { - fmt.Print(renderedMessage) + fmt.Println(renderedMessage) return } @@ -268,7 +268,7 @@ func StartProvisioning(clusterName string) { if provisioningCluster.Status == "provisioned" { fmt.Println("\n cluster has been provisioned via ci") - fmt.Println(fmt.Sprintf("\n kubefirst URL: https://kubefirst.%s", provisioningCluster.DomainName)) + fmt.Printf("\n kubefirst URL: https://kubefirst.%s \n", provisioningCluster.DomainName) done <- true } }