summaryrefslogtreecommitdiff
path: root/packages/core/src/code_assist/oauth2.ts
diff options
context:
space:
mode:
authorMarat Boshernitsan <[email protected]>2025-07-21 16:23:28 -0700
committerGitHub <[email protected]>2025-07-21 23:23:28 +0000
commit5066bc538431482d3e44d1d932909e5a5bc6e69d (patch)
tree9764872215257449486dc84c559f67ca307b6e9b /packages/core/src/code_assist/oauth2.ts
parent97cf26ec5301f7b4552a5e89214a13e4b714b9eb (diff)
Refactor the logic for deciding whether to launch a browser into config (#4622)
Diffstat (limited to 'packages/core/src/code_assist/oauth2.ts')
-rw-r--r--packages/core/src/code_assist/oauth2.ts3
1 files changed, 1 insertions, 2 deletions
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++) {