fix(cli): prioritize configured auth over env vars in non-interactive mode (#10935)

This commit is contained in:
Sandy Tao
2025-10-10 16:50:54 -07:00
committed by GitHub
parent cd9193466e
commit 09ef33ec3a
3 changed files with 43 additions and 32 deletions

View File

@@ -80,11 +80,9 @@ describe('JSON output', () => {
expect(payload.error.type).toBe('Error');
expect(payload.error.code).toBe(1);
expect(payload.error.message).toContain(
'configured auth type is gemini-api-key',
);
expect(payload.error.message).toContain(
'current auth type is oauth-personal',
"enforced authentication type is 'gemini-api-key'",
);
expect(payload.error.message).toContain("current type is 'oauth-personal'");
});
it('should not exit on tool errors and allow model to self-correct in JSON mode', async () => {