fix cannot exit astro bug (#3276)

* fix cannot exit astro bug

* Create loud-tigers-draw.md
This commit is contained in:
Fred K. Schott 2022-05-03 12:29:34 -07:00 committed by GitHub
parent 8f8f05c1b9
commit 6d5ef41b1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
"@astrojs/telemetry": patch
---
fix "cannot exit astro" bug

View file

@ -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