Add error handling to autorun
| @@ -318,8 +318,12 @@ async function postSetupTasks(result) { | ||
| 318 | 318 | const autorunUrl = cliArgs.getAutorunUrl(autorunHostname); |
| 319 | 319 | |
| 320 | 320 | if (cliArgs.autorun) { |
| 321 | + try { | |
| 321 | 322 | console.log('Launching in a browser...'); |
| 322 | 323 | await open(autorunUrl.toString()); |
| 324 | + } catch (error) { | |
| 325 | + console.error('Failed to launch the browser. Open the URL manually.'); | |
| 326 | + } | |
| 323 | 327 | } |
| 324 | 328 | |
| 325 | 329 | setWindowTitle('SillyTavern WebServer'); |