diff --git a/build/ci/evergreen.yml b/build/ci/evergreen.yml index c9cdfdecc5..c58a9cff22 100644 --- a/build/ci/evergreen.yml +++ b/build/ci/evergreen.yml @@ -129,6 +129,7 @@ functions: CONFIG_PATH=$(./bin/atlas config edit 2>/dev/null) cat < "$CONFIG_PATH" skip_update_check = true + telemetry_enabled = false [__e2e] org_id = '${atlas_org_id}' @@ -137,7 +138,6 @@ functions: private_api_key = '${atlas_private_api_key}' ops_manager_url = '${mcli_ops_manager_url}' service = 'cloud' - telemetry_enabled = false output = 'plaintext' [__e2e_gov] @@ -147,7 +147,6 @@ functions: private_api_key = '${atlas_gov_private_api_key}' ops_manager_url = '${mcli_cloud_gov_ops_manager_url}' service = 'cloudgov' - telemetry_enabled = false output = 'plaintext' [__e2e_snapshot] @@ -157,7 +156,6 @@ functions: private_api_key = '12345678-abcd-ef01-2345-6789abcdef01' ops_manager_url = 'http://localhost:8080/' service = 'cloud' - telemetry_enabled = false output = 'plaintext' EOF - command: subprocess.exec diff --git a/internal/cli/auth/logout.go b/internal/cli/auth/logout.go index ecfd14d035..f384fd66df 100644 --- a/internal/cli/auth/logout.go +++ b/internal/cli/auth/logout.go @@ -154,12 +154,12 @@ func LogoutBuilder() *cobra.Command { `, PreRunE: func(cmd *cobra.Command, _ []string) error { opts.OutWriter = cmd.OutOrStdout() - opts.config = config.Default() - // If the profile is set in the context, use it instead of the default profile profile, ok := config.ProfileFromContext(cmd.Context()) if ok { opts.config = profile + } else { + opts.config = config.Default() } // Only initialize OAuth flow if we have OAuth-based auth @@ -173,13 +173,14 @@ func LogoutBuilder() *cobra.Command { var message, entry string var err error + logoutMessage := "Are you sure you want to log out of profile " + opts.config.Name() switch opts.config.AuthType() { case config.APIKeys: entry = opts.config.PublicAPIKey() - message = "Are you sure you want to log out of account with public API key %s?" + message = logoutMessage + " with public API key %s?" case config.ServiceAccount: entry = opts.config.ClientID() - message = "Are you sure you want to log out of service account %s?" + message = logoutMessage + " with service account %s?" case config.UserAccount: entry, err = opts.config.AccessTokenSubject() if err != nil { @@ -190,10 +191,10 @@ func LogoutBuilder() *cobra.Command { return ErrUnauthenticated } - message = "Are you sure you want to log out of account %s?" + message = logoutMessage + " with user account %s?" case config.NoAuth, "": entry = opts.config.Name() - message = "Are you sure you want to clear profile %s?" + message = logoutMessage + "?" } opts.Entry = entry