File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -324,18 +324,22 @@ ${target.split(':')[0]}${https ? '' : ':80'} {
324
324
// caddy log
325
325
// eslint-disable-next-line no-console
326
326
showCaddyLog && line && console . info ( line )
327
- if ( line . includes ( 'Error:' ) || ( line && JSON . parse ( line ) . level === 'error' ) ) {
328
- if ( line . includes ( 'parsing caddyfile tokens' ) ) {
329
- consola . error ( 'Caddyfile syntax error, please contact the author:\n' , `${ this . caddyfile } \n\n${ line } \n` )
330
- await this . baseCleanup ( )
331
- process . exit ( )
332
- }
333
- else {
334
- consola . error ( `${ line } \n` )
335
- // child.kill()
336
- return reject ( line )
327
+ try {
328
+ if ( line . includes ( 'Error:' ) || ( line && JSON . parse ( line ) . level === 'error' ) ) {
329
+ if ( line . includes ( 'parsing caddyfile tokens' ) ) {
330
+ consola . error ( 'Caddyfile syntax error, please contact the author:\n' , `${ this . caddyfile } \n\n${ line } \n` )
331
+ await this . baseCleanup ( )
332
+ process . exit ( )
333
+ }
334
+ else {
335
+ consola . error ( `${ line } \n` )
336
+ // child.kill()
337
+ return reject ( line )
338
+ }
337
339
}
338
340
}
341
+ catch { }
342
+
339
343
if ( line . includes ( 'config file changed' ) )
340
344
consola . success ( 'Detect added a new reverse proxy config, restarted.\n' )
341
345
You can’t perform that action at this time.
0 commit comments