From 3a163f166e07cf3a8534cf47bcbf5a7fec582416 Mon Sep 17 00:00:00 2001 From: "devsy-app[bot]" <277138668+devsy-app[bot]@users.noreply.github.com> Date: Sun, 9 Aug 2026 21:27:34 +0000 Subject: [PATCH] fix: drop else after return in platform Login Drop redundant else after early return in Login to satisfy the Codefactor Maintainability check. The browser-open success path no longer nests under an else, so it runs on the function's top indentation level. Codefactor issue: 6a77b13d5b1ec0b4ee20c43e File: pkg/platform/client/client.go:293 --- pkg/platform/client/client.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/platform/client/client.go b/pkg/platform/client/client.go index 44fa3fb1ba..e02516b643 100644 --- a/pkg/platform/client/client.go +++ b/pkg/platform/client/client.go @@ -290,19 +290,19 @@ func (c *client) Login(host string, insecure bool) error { err, fmt.Sprintf(AccessKeyPath, host), ) - } else { - log.Infof("If the browser does not open automatically, navigate to %s", loginUrl) - msg := "If you have problems logging in, navigate to %s/profile/access-keys, " + - "click on 'Create Access Key' and then login via '%s %s --access-key ACCESS_KEY" - if insecure { - msg += " --insecure" - } - msg += "'" - log.Infof(msg, host, pkgconfig.BinaryName+" pro login", host) - log.Infof("Logging into Devsy Pro") + } - key = <-keyChannel + log.Infof("If the browser does not open automatically, navigate to %s", loginUrl) + msg := "If you have problems logging in, navigate to %s/profile/access-keys, " + + "click on 'Create Access Key' and then login via '%s %s --access-key ACCESS_KEY" + if insecure { + msg += " --insecure" } + msg += "'" + log.Infof(msg, host, pkgconfig.BinaryName+" pro login", host) + log.Infof("Logging into Devsy Pro") + + key = <-keyChannel go func() { err = server.Shutdown(context.Background())