mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	add autorun command line argument
This commit is contained in:
		@@ -72,6 +72,11 @@ if (process.versions && process.versions.node && process.versions.node.match(/20
 | 
			
		||||
dns.setDefaultResultOrder('ipv4first');
 | 
			
		||||
 | 
			
		||||
const cliArguments = yargs(hideBin(process.argv))
 | 
			
		||||
    .option('autorun', {
 | 
			
		||||
        type: 'boolean',
 | 
			
		||||
        default: null,
 | 
			
		||||
        describe: 'Automatically launch SillyTavern in the browser.'
 | 
			
		||||
    })
 | 
			
		||||
    .option('disableCsrf', {
 | 
			
		||||
        type: 'boolean',
 | 
			
		||||
        default: false,
 | 
			
		||||
@@ -116,7 +121,7 @@ if (fs.existsSync(whitelistPath)) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const whitelistMode = config.whitelistMode;
 | 
			
		||||
const autorun = config.autorun && !cliArguments.ssl;
 | 
			
		||||
const autorun = config.autorun && cliArguments.autorun!==false && !cliArguments.ssl;
 | 
			
		||||
const enableExtensions = config.enableExtensions;
 | 
			
		||||
const listen = config.listen;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user