From 646ce09d23251f3eb89032d006f737a237620653 Mon Sep 17 00:00:00 2001 From: Rashi Chaubal <12rashic@gmail.com> Date: Tue, 7 Jan 2025 15:03:23 +0530 Subject: [PATCH] fixed client.go code - loft with vCluster platform (#2380) Signed-off-by: Rashi Chaubal <12rashic@gmail.com> --- pkg/platform/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/platform/client.go b/pkg/platform/client.go index 2cba31484..b08f538cf 100644 --- a/pkg/platform/client.go +++ b/pkg/platform/client.go @@ -232,7 +232,7 @@ func (c *client) Config() *config.CLI { func verifyHost(host string) error { if !strings.HasPrefix(host, "https") { - return fmt.Errorf("cannot log into a non https loft instance '%s', please make sure you have TLS enabled", host) + return fmt.Errorf(product.Replace("cannot log into a non https loft instance '%s', please make sure you have TLS enabled"), host) } return nil @@ -347,7 +347,7 @@ func (c *client) LoginWithAccessKey(host, accessKey string, insecure bool) error if errors.As(err, &urlError) && urlError != nil { var err x509.UnknownAuthorityError if errors.As(urlError.Err, &err) { - return fmt.Errorf("unsafe login endpoint '%s', if you wish to login into an insecure loft endpoint run with the '--insecure' flag", c.config.Platform.Host) + return fmt.Errorf(product.Replace("cannot log into a non https loft instance '%s', please make sure you have TLS enabled"), host) } }