From 6d5ef41b1ed77ccc67f71e91adeab63a50a494a8 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 3 May 2022 12:29:34 -0700 Subject: [PATCH] fix cannot exit astro bug (#3276) * fix cannot exit astro bug * Create loud-tigers-draw.md --- .changeset/loud-tigers-draw.md | 5 +++++ packages/telemetry/src/index.ts | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/loud-tigers-draw.md diff --git a/.changeset/loud-tigers-draw.md b/.changeset/loud-tigers-draw.md new file mode 100644 index 000000000..80031cf54 --- /dev/null +++ b/.changeset/loud-tigers-draw.md @@ -0,0 +1,5 @@ +--- +"@astrojs/telemetry": patch +--- + +fix "cannot exit astro" bug diff --git a/packages/telemetry/src/index.ts b/packages/telemetry/src/index.ts index ef7157dfc..a11f4ae0e 100644 --- a/packages/telemetry/src/index.ts +++ b/packages/telemetry/src/index.ts @@ -49,8 +49,9 @@ export class AstroTelemetry { } constructor(private opts: AstroTelemetryOptions) { - // When the process exits, flush any queued promises - process.on('SIGINT', () => this.flush()); + // TODO: When the process exits, flush any queued promises + // This line caused a "cannot exist astro" error, needs to be revisited. + // process.on('SIGINT', () => this.flush()); } // Util to get value from config or set it if missing