From 6a516bf3eb077ff1511669ce14dae77258e6364f Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 7 Dec 2023 00:55:36 +0200 Subject: [PATCH] Require only one autorun argument to be true --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index a48a2543c..7dfbdf2a6 100644 --- a/server.js +++ b/server.js @@ -74,7 +74,7 @@ dns.setDefaultResultOrder('ipv4first'); const cliArguments = yargs(hideBin(process.argv)) .option('autorun', { type: 'boolean', - default: true, + default: false, describe: 'Automatically launch SillyTavern in the browser.', }).option('corsProxy', { type: 'boolean', @@ -124,7 +124,7 @@ if (fs.existsSync(whitelistPath)) { } const whitelistMode = getConfigValue('whitelistMode', true); -const autorun = getConfigValue('autorun', false) && cliArguments.autorun && !cliArguments.ssl; +const autorun = (getConfigValue('autorun', false) || cliArguments.autorun) && !cliArguments.ssl; const enableExtensions = getConfigValue('enableExtensions', true); const listen = getConfigValue('listen', false);