This commit is contained in:
qszhu 2026-04-21 13:38:03 +08:00 committed by GitHub
commit d85487ca7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -878,10 +878,8 @@ Logging in with Google... Restarting Gemini CLI to continue.
async (apiKey: string) => {
try {
onAuthError(null);
if (!apiKey.trim() && apiKey.length > 1) {
onAuthError(
'API key cannot be empty string with length greater than 1.',
);
if (!apiKey.trim()) {
onAuthError('API key cannot be empty.');
return;
}