Fix class method bind. Await open promise
| @@ -327,10 +327,10 @@ async function preSetupTasks() { | ||
| 327 | 327 | async function postSetupTasks(result) { |
| 328 | 328 | const autorunHostname = await cliArgs.getAutorunHostname(result); |
| 329 | 329 | const autorunUrl = cliArgs.getAutorunUrl(autorunHostname); |
| 330 | - console.log('Launching...'); | |
| 331 | 330 | |
| 332 | 331 | if (cliArgs.autorun) { |
| 333 | - open(autorunUrl.toString()); | |
| 332 | + console.log('Launching in a browser...'); | |
| 333 | + await open(autorunUrl.toString()); | |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | setWindowTitle('SillyTavern WebServer'); |
| @@ -457,5 +457,5 @@ initUserStorage(globalThis.DATA_ROOT) | ||
| 457 | 457 | .then(verifySecuritySettings) |
| 458 | 458 | .then(preSetupTasks) |
| 459 | 459 | .then(apply404Middleware) |
| 460 | 460 | .then(() => new ServerStartup(app, cliArgs).start()) |
| 461 | 461 | .then(postSetupTasks); |