mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
Add a setting to disable auth mode validation on startup (#5358)
This commit is contained in:
parent
a2db3d1b38
commit
cab60a38a1
6 changed files with 143 additions and 18 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue