Require only one autorun argument to be true

This commit is contained in:
Cohee 2023-12-07 00:55:36 +02:00
parent e65d1ad20f
commit 6a516bf3eb
1 changed files with 2 additions and 2 deletions

View File

@ -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);