@@ -289,35 +289,37 @@ export class Start extends BaseCommand {
289
289
const editorUrl = Container . get ( UrlService ) . baseUrl ;
290
290
this . log ( `\nEditor is now accessible via:\n${ editorUrl } ` ) ;
291
291
292
+ if ( inBenchmark ) return ;
293
+
292
294
// Allow to open n8n editor by pressing "o"
293
- // if (Boolean(process.stdout.isTTY) && process.stdin.setRawMode) {
294
- // process.stdin.setRawMode(true);
295
- // process.stdin.resume();
296
- // process.stdin.setEncoding('utf8');
297
-
298
- // if (flags.open) {
299
- // this.openBrowser();
300
- // }
301
- // this.log('\nPress "o" to open in Browser.');
302
- // process.stdin.on('data', (key: string) => {
303
- // if (key === 'o') {
304
- // this.openBrowser();
305
- // } else if (key.charCodeAt(0) === 3) {
306
- // // Ctrl + c got pressed
307
- // void this.stopProcess();
308
- // } else {
309
- // // When anything else got pressed, record it and send it on enter into the child process
310
-
311
- // if (key.charCodeAt(0) === 13) {
312
- // // send to child process and print in terminal
313
- // process.stdout.write('\n');
314
- // } else {
315
- // // record it and write into terminal
316
- // process.stdout.write(key);
317
- // }
318
- // }
319
- // });
320
- // }
295
+ if ( Boolean ( process . stdout . isTTY ) && process . stdin . setRawMode ) {
296
+ process . stdin . setRawMode ( true ) ;
297
+ process . stdin . resume ( ) ;
298
+ process . stdin . setEncoding ( 'utf8' ) ;
299
+
300
+ if ( flags . open ) {
301
+ this . openBrowser ( ) ;
302
+ }
303
+ this . log ( '\nPress "o" to open in Browser.' ) ;
304
+ process . stdin . on ( 'data' , ( key : string ) => {
305
+ if ( key === 'o' ) {
306
+ this . openBrowser ( ) ;
307
+ } else if ( key . charCodeAt ( 0 ) === 3 ) {
308
+ // Ctrl + c got pressed
309
+ void this . stopProcess ( ) ;
310
+ } else {
311
+ // When anything else got pressed, record it and send it on enter into the child process
312
+
313
+ if ( key . charCodeAt ( 0 ) === 13 ) {
314
+ // send to child process and print in terminal
315
+ process . stdout . write ( '\n' ) ;
316
+ } else {
317
+ // record it and write into terminal
318
+ process . stdout . write ( key ) ;
319
+ }
320
+ }
321
+ } ) ;
322
+ }
321
323
}
322
324
323
325
async initPruning ( ) {
0 commit comments