You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/03/30 15:56:58 UTC

[camel-k] 02/02: Fix #1379: fix lint

This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 5c97ab4474876b0cd2931a2b494945cd1b891b59
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Mon Mar 30 16:48:26 2020 +0200

    Fix #1379: fix lint
---
 pkg/cmd/operator/operator.go | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/pkg/cmd/operator/operator.go b/pkg/cmd/operator/operator.go
index 8ed6f7c..8394e91 100644
--- a/pkg/cmd/operator/operator.go
+++ b/pkg/cmd/operator/operator.go
@@ -138,13 +138,6 @@ func Run() {
 		os.Exit(1)
 	}
 
-	// Try to register the OpenShift CLI Download link if possible
-	installCtx, _ := context.WithTimeout(context.TODO(), 30 * time.Second)
-	if err := install.OpenShiftConsoleDownloadLink(installCtx, c); err != nil {
-		log.Info("Cannot install OpenShift CLI download link: skipping.")
-		log.V(8).Info("Error while installing OpenShift CLI download link", "error", err)
-	}
-
 	log.Info("Registering Components.")
 
 	// Setup Scheme for all resources
@@ -153,6 +146,14 @@ func Run() {
 		os.Exit(1)
 	}
 
+	// Try to register the OpenShift CLI Download link if possible
+	installCtx, installCancel := context.WithTimeout(context.TODO(), 30*time.Second)
+	defer installCancel()
+	if err := install.OpenShiftConsoleDownloadLink(installCtx, c); err != nil {
+		log.Info("Cannot install OpenShift CLI download link: skipping.")
+		log.V(8).Info("Error while installing OpenShift CLI download link", "error", err)
+	}
+
 	// Setup all Controllers
 	if err := controller.AddToManager(mgr); err != nil {
 		log.Error(err, "")