mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 23:14:32 -07:00
fix: correct API key validation logic in handleApiKeySubmit (#25453)
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
This commit is contained in:
@@ -875,10 +875,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 or whitespace only.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user