From d12dd5fa6389bc7f2346e68d039bb2e83ae00c5c Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sat, 13 Jun 2026 23:55:45 -0400 Subject: [PATCH] Fix syntax error in gmail-agent index.js --- gmail-agent/index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gmail-agent/index.js b/gmail-agent/index.js index 6bfcc21..b7703a4 100644 --- a/gmail-agent/index.js +++ b/gmail-agent/index.js @@ -28,12 +28,11 @@ function loadAuth() { console.warn('⚠️ Missing credentials.json. Gmail Agent will not be able to process emails or authenticate new accounts until this file is provided.'); return; } - if (!fs.existsSync(TOKENS_DIR)) { - fs.mkdirSync(TOKENS_DIR, { recursive: true }); - console.log('Created empty tokens directory.'); - } - - try { + if (!fs.existsSync(TOKENS_DIR)) { + fs.mkdirSync(TOKENS_DIR, { recursive: true }); + console.log('Created empty tokens directory.'); + } + const creds = getCredentials(); const {client_secret, client_id, redirect_uris} = creds.installed || creds.web; baseOAuth2Client = { client_id, client_secret, redirect_uri: redirect_uris[0] || 'urn:ietf:wg:oauth:2.0:oob' };