From 6b005cb91c54956d44b9f0e8d6b895308c267118 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Fri, 10 Nov 2023 15:14:51 -0400 Subject: [PATCH] fix: add ctrl+c 130 listener (#445) * fix: add ctrl+c 130 listener * chore: handle more events --- src/sfCommand.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sfCommand.ts b/src/sfCommand.ts index 967fd089c..5d3ea2c1e 100644 --- a/src/sfCommand.ts +++ b/src/sfCommand.ts @@ -345,6 +345,12 @@ export abstract class SfCommand extends Command { } public async _run(): Promise { + ['SIGINT', 'SIGTERM', 'SIGBREAK', 'SIGHUP'].map((listener) => { + process.on(listener, () => { + this.exit(130); + }); + }); + this.configAggregator = await ConfigAggregator.create(); if (this.statics.requiresProject) {