From 505abfd6430b1f71e52d10b02bf9beb5847df8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=91=9E=E4=B8=B0?= Date: Tue, 15 Nov 2022 15:27:16 +0800 Subject: [PATCH] fix(create-astro): fix error when don't have template input (#5404) --- .changeset/violet-apricots-smash.md | 5 +++++ packages/create-astro/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/violet-apricots-smash.md diff --git a/.changeset/violet-apricots-smash.md b/.changeset/violet-apricots-smash.md new file mode 100644 index 000000000..eb472b8a8 --- /dev/null +++ b/.changeset/violet-apricots-smash.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +fix error when don't have template input diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index aa1024329..55b285e89 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -163,7 +163,7 @@ export async function main() { { onCancel: () => ora().info(dim('Operation cancelled. See you later, astronaut!')) } ); - if (!options.template) { + if (!options.template || options.template === true) { ora().info(dim('No template provided. See you later, astronaut!')); process.exit(1); }