summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Juan Martín Seery <me@juanm04.com> 2022-04-03 14:32:39 -0300
committerGravatar GitHub <noreply@github.com> 2022-04-03 14:32:39 -0300
commit824458790a45e9b476e8acf6c406c49d28740dea (patch)
tree6a88e3b2ab3d13ddca635cdda8e024fb4ffbe1a2
parentad3c391696c5b9cc350a22831717682e73e25776 (diff)
downloadastro-824458790a45e9b476e8acf6c406c49d28740dea.tar.gz
astro-824458790a45e9b476e8acf6c406c49d28740dea.tar.zst
astro-824458790a45e9b476e8acf6c406c49d28740dea.zip
fix(cli): prevent CLI from hanging (#2974)
* fix(cli): prevent hanging CLI * Changeset
-rw-r--r--.changeset/soft-dolphins-join.md5
-rwxr-xr-xpackages/astro/astro.js4
2 files changed, 8 insertions, 1 deletions
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));