diff --git a/packages/cli/src/commands/webhook.ts b/packages/cli/src/commands/webhook.ts index c061efbcb..2bacd7912 100644 --- a/packages/cli/src/commands/webhook.ts +++ b/packages/cli/src/commands/webhook.ts @@ -80,6 +80,9 @@ export class Webhook extends BaseCommand { async run() { await new WebhookServer().start(); this.logger.info('Webhook listener waiting for requests.'); + + // Make sure that the process does not close + await new Promise(() => {}); } async catch(error: Error) { diff --git a/packages/cli/src/commands/worker.ts b/packages/cli/src/commands/worker.ts index bd4c09266..66073ed71 100644 --- a/packages/cli/src/commands/worker.ts +++ b/packages/cli/src/commands/worker.ts @@ -353,6 +353,9 @@ export class Worker extends BaseCommand { } }); } + + // Make sure that the process does not close + await new Promise(() => {}); } async catch(error: Error) {