diff --git a/packages/cli/src/commands/BaseCommand.ts b/packages/cli/src/commands/BaseCommand.ts index d0c34dac0a86d..d2cf986af23b8 100644 --- a/packages/cli/src/commands/BaseCommand.ts +++ b/packages/cli/src/commands/BaseCommand.ts @@ -315,7 +315,7 @@ export abstract class BaseCommand extends Command { this.exit(exitCode); } - private onTerminationSignal(signal: string) { + protected onTerminationSignal(signal: string) { return async () => { if (this.shutdownService.isShuttingDown()) { this.logger.info(`Received ${signal}. Already shutting down...`); diff --git a/packages/cli/src/commands/start.ts b/packages/cli/src/commands/start.ts index 99df74fabd6cd..0ebfbbc1a6dae 100644 --- a/packages/cli/src/commands/start.ts +++ b/packages/cli/src/commands/start.ts @@ -332,7 +332,7 @@ export class Start extends BaseCommand { this.openBrowser(); } else if (key.charCodeAt(0) === 3) { // Ctrl + c got pressed - void this.stopProcess(); + void this.onTerminationSignal('SIGINT')(); } else { // When anything else got pressed, record it and send it on enter into the child process