From 1307013d86eccdaf2a2f0fac27b4e27d6ca6e934 Mon Sep 17 00:00:00 2001 From: Jacek Wysocki Date: Fri, 16 Jun 2023 08:02:29 +0200 Subject: [PATCH] fix: removed header from completion script (#4049) * fix: removed header from completion script * fix: removed printf --- cmd/kubectl-testkube/commands/root.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/kubectl-testkube/commands/root.go b/cmd/kubectl-testkube/commands/root.go index c8a2090ef78..b0eff1c2252 100644 --- a/cmd/kubectl-testkube/commands/root.go +++ b/cmd/kubectl-testkube/commands/root.go @@ -64,16 +64,16 @@ var RootCmd = &cobra.Command{ PersistentPreRun: func(cmd *cobra.Command, args []string) { ui.SetVerbose(verbose) + // don't validate context before set and completion + if cmd.Name() == "context" || cmd.Parent().Name() == "completion" { + return + } + cfg, err := config.Load() ui.ExitOnError("loading config", err) common.UiContextHeader(cmd, cfg) - // don't validate context before set - if cmd.Name() == "context" { - return - } - if err = validator.ValidateCloudContext(cfg); err != nil { common.UiCloudContextValidationError(err) }