From d9be7e36b872eb48516dc9d0d5c9d333aac4950b Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 28 Oct 2022 14:05:46 -0500 Subject: [PATCH] fix(create-astro): improve error messages when create-astro fails (#5240) Co-authored-by: Nate Moore --- .changeset/chilly-mice-agree.md | 5 +++++ packages/create-astro/src/index.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/chilly-mice-agree.md diff --git a/.changeset/chilly-mice-agree.md b/.changeset/chilly-mice-agree.md new file mode 100644 index 000000000..b4b21263d --- /dev/null +++ b/.changeset/chilly-mice-agree.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +Improve error messages when `create-astro` fails diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index 16ac7e402..9be3e4ff9 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -147,6 +147,7 @@ export async function main() { } if (!cwd) { + ora().info(dim('No directory provided. See you later, astronaut!')) process.exit(1); } @@ -163,6 +164,7 @@ export async function main() { ); if (!options.template) { + ora().info(dim('No template provided. See you later, astronaut!')) process.exit(1); }