Skip to content

Commit 84c7a55

Browse files
committed
[Identity] Refactor broker SSO availability check to use instance variable
1 parent ba47ebe commit 84c7a55

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/azure-cli-core/azure/cli/core/auth/identity.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
55

6-
import cmd
76
import json
87
import os
98
import re
@@ -164,9 +163,8 @@ def _prompt_launching_ui(ui=None, **_):
164163

165164
from .agentic_session import is_agentic_session
166165
is_agentic_session_value = is_agentic_session()
167-
enable_broker_on_windows = cmd.cli_ctx.config.getboolean('core', 'enable_broker_on_windows', fallback=True)
168166
# Broker is available only on Windows for now
169-
broker_sso_available = sys.platform.startswith('win') and enable_broker_on_windows
167+
broker_sso_available = sys.platform.startswith('win') and self._enable_broker_on_windows
170168
logger.debug("use_broker_sso: %s, is_agentic_session: %s, broker_sso_available: %s",
171169
use_broker_sso, is_agentic_session_value, broker_sso_available)
172170
use_broker_sso = (use_broker_sso or is_agentic_session_value) and broker_sso_available

0 commit comments

Comments
 (0)