From d22f0aa3160492e673ffe84fb28f351d6a9ae6d5 Mon Sep 17 00:00:00 2001 From: Mark Rapson Date: Sun, 5 Jul 2026 21:07:57 +0100 Subject: [PATCH] Updated config check. --- lib/config.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/config.js b/lib/config.js index eaef014..7d50af0 100644 --- a/lib/config.js +++ b/lib/config.js @@ -32,15 +32,14 @@ function validateConfig(config) { const hasApiKeys = Array.isArray(config.apiKeys) && config.apiKeys.length > 0; const hasSvcAccounts = Array.isArray(config.serviceAccounts) && config.serviceAccounts.length > 0; - const hasCredPath = !!config.credentialsPath; // Do not allow both API keys and service accounts to be present simultaneously if (hasApiKeys && hasSvcAccounts) { throw new Error('Configuration must not include both `apiKeys` and `serviceAccounts`; choose one authentication method'); } - if (!hasApiKeys && !hasSvcAccounts && !hasCredPath) { - throw new Error('Configuration must include at least one of: `apiKeys`, `serviceAccounts`, or `credentialsPath`'); + if (!hasApiKeys && !hasSvcAccounts) { + throw new Error('Configuration must include at least one `apiKeys` or `serviceAccounts`'); } // Basic validation of documents/sheets structure