From 824458790a45e9b476e8acf6c406c49d28740dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Seery?= Date: Sun, 3 Apr 2022 14:32:39 -0300 Subject: [PATCH] fix(cli): prevent CLI from hanging (#2974) * fix(cli): prevent hanging CLI * Changeset --- .changeset/soft-dolphins-join.md | 5 +++++ packages/astro/astro.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/soft-dolphins-join.md diff --git a/.changeset/soft-dolphins-join.md b/.changeset/soft-dolphins-join.md new file mode 100644 index 000000000..e03f6b388 --- /dev/null +++ b/.changeset/soft-dolphins-join.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Prevent CLI from hanging diff --git a/packages/astro/astro.js b/packages/astro/astro.js index 69ea565f7..d763b0302 100755 --- a/packages/astro/astro.js +++ b/packages/astro/astro.js @@ -96,4 +96,6 @@ Please upgrade Node.js to a supported version: "${engines}"\n`); process.exit(1); } -main(); +main() + .then(() => process.exit(0)) + .catch(() => process.exit(1));