Skip to content

Commit

Permalink
fix: add ctrl+c 130 listener (#445)
Browse files Browse the repository at this point in the history
* fix: add ctrl+c 130 listener

* chore: handle more events
  • Loading branch information
WillieRuemmele authored Nov 10, 2023
1 parent ed52569 commit 6b005cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ export abstract class SfCommand<T> extends Command {
}

public async _run<R>(): Promise<R> {
['SIGINT', 'SIGTERM', 'SIGBREAK', 'SIGHUP'].map((listener) => {
process.on(listener, () => {
this.exit(130);
});
});

this.configAggregator = await ConfigAggregator.create();

if (this.statics.requiresProject) {
Expand Down

0 comments on commit 6b005cb

Please sign in to comment.