From 5066bc538431482d3e44d1d932909e5a5bc6e69d Mon Sep 17 00:00:00 2001 From: Marat Boshernitsan Date: Mon, 21 Jul 2025 16:23:28 -0700 Subject: Refactor the logic for deciding whether to launch a browser into config (#4622) --- packages/core/src/code_assist/oauth2.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/core/src/code_assist/oauth2.ts') diff --git a/packages/core/src/code_assist/oauth2.ts b/packages/core/src/code_assist/oauth2.ts index 51227086..5958625a 100644 --- a/packages/core/src/code_assist/oauth2.ts +++ b/packages/core/src/code_assist/oauth2.ts @@ -26,7 +26,6 @@ import { clearCachedGoogleAccount, } from '../utils/user_account.js'; import { AuthType } from '../core/contentGenerator.js'; -import { shouldAttemptBrowserLaunch } from '../utils/browser.js'; import readline from 'node:readline'; // OAuth Client ID used to initiate OAuth2Client class. @@ -122,7 +121,7 @@ export async function getOauthClient( } } - if (config.getNoBrowser() || !shouldAttemptBrowserLaunch()) { + if (config.isBrowserLaunchSuppressed()) { let success = false; const maxRetries = 2; for (let i = 0; !success && i < maxRetries; i++) { -- cgit v1.2.3