diff options
| author | Billy Biggs <[email protected]> | 2025-08-01 11:49:03 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-01 18:49:03 +0000 |
| commit | 24c5a15d7acdde3bd93c948db2227305951487a3 (patch) | |
| tree | 30a00186fa391aef1dc93b8dfc022d088efa67f3 /packages/cli/src/validateNonInterActiveAuth.ts | |
| parent | c725e258c657007ddd4dc4f8d5e896ea6b775818 (diff) | |
Add a setting to disable auth mode validation on startup (#5358)
Diffstat (limited to 'packages/cli/src/validateNonInterActiveAuth.ts')
| -rw-r--r-- | packages/cli/src/validateNonInterActiveAuth.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/cli/src/validateNonInterActiveAuth.ts b/packages/cli/src/validateNonInterActiveAuth.ts index a85b7370..7e80b30e 100644 --- a/packages/cli/src/validateNonInterActiveAuth.ts +++ b/packages/cli/src/validateNonInterActiveAuth.ts @@ -23,6 +23,7 @@ function getAuthTypeFromEnv(): AuthType | undefined { export async function validateNonInteractiveAuth( configuredAuthType: AuthType | undefined, + useExternalAuth: boolean | undefined, nonInteractiveConfig: Config, ) { const effectiveAuthType = configuredAuthType || getAuthTypeFromEnv(); @@ -34,10 +35,12 @@ export async function validateNonInteractiveAuth( process.exit(1); } - const err = validateAuthMethod(effectiveAuthType); - if (err != null) { - console.error(err); - process.exit(1); + if (!useExternalAuth) { + const err = validateAuthMethod(effectiveAuthType); + if (err != null) { + console.error(err); + process.exit(1); + } } await nonInteractiveConfig.refreshAuth(effectiveAuthType); |
