Skip to content

Commit

Permalink
fixed client.go code - loft with vCluster platform (#2380)
Browse files Browse the repository at this point in the history
Signed-off-by: Rashi Chaubal <[email protected]>
  • Loading branch information
12rashic authored Jan 7, 2025
1 parent a014dba commit 646ce09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/platform/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 646ce09

Please sign in to comment.