From 5ed625c87a4aae36abae6fbacc15cc5006e2e041 Mon Sep 17 00:00:00 2001 From: asim-shrestha Date: Tue, 30 May 2023 16:23:03 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=99=8F=20Remove=20"webSearchEnabled"=20va?= =?UTF-8?q?riable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/src/envGenerator.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cli/src/envGenerator.js b/cli/src/envGenerator.js index 0f59c616dd..6bc14d197b 100644 --- a/cli/src/envGenerator.js +++ b/cli/src/envGenerator.js @@ -8,15 +8,12 @@ export const generateEnv = (envValues) => { let platformUrl = isDockerCompose ? "http://host.docker.internal:8000" : "http://localhost:8000"; - const websearchEnabled = - envValues.serpApiKey !== null && envValues.serpApiKey !== ""; const envDefinition = getEnvDefinition( envValues, isDockerCompose, dbPort, platformUrl, - websearchEnabled ); const envFileContent = generateEnvFileContent(envDefinition); @@ -28,7 +25,6 @@ const getEnvDefinition = ( isDockerCompose, dbPort, platformUrl, - websearchEnabled ) => { return { "Deployment Environment": { @@ -86,9 +82,9 @@ const generateEnvFileContent = (config) => { let configFile = ""; Object.entries(config).forEach(([section, variables]) => { - configFile += `# ${section}:\n`; + configFile += `# ${ section }:\n`; Object.entries(variables).forEach(([key, value]) => { - configFile += `${key}="${value}"\n`; + configFile += `${ key }="${ value }"\n`; }); configFile += "\n"; }); @@ -137,7 +133,7 @@ export const testEnvFile = () => { if (missingFromFile.length > 0) { errorMessage += "\nYour ./next/.env is missing the following keys:\n"; missingFromFile.forEach((key) => { - errorMessage += chalk.whiteBright(`- ❌ ${key}\n`); + errorMessage += chalk.whiteBright(`- ❌ ${ key }\n`); }); errorMessage += "\n"; } @@ -145,7 +141,7 @@ export const testEnvFile = () => { if (missingFromDef.length > 0) { errorMessage += "Your ./next/.env is missing the following keys:\n"; missingFromDef.forEach((key) => { - errorMessage += chalk.whiteBright(`- ⚠️ ${key}\n`); + errorMessage += chalk.whiteBright(`- ⚠️ ${ key }\n`); }); errorMessage += "\n"; }