Skip to content

Commit 02f4809

Browse files
committed
Remove commented out start code
1 parent 7a4be56 commit 02f4809

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

packages/cli/src/commands/start.ts

+30-28
Original file line numberDiff line numberDiff line change
@@ -289,35 +289,37 @@ export class Start extends BaseCommand {
289289
const editorUrl = Container.get(UrlService).baseUrl;
290290
this.log(`\nEditor is now accessible via:\n${editorUrl}`);
291291

292+
if (inBenchmark) return;
293+
292294
// 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+
}
321323
}
322324

323325
async initPruning() {

0 commit comments

Comments
 (0)