fix(create-astro): fix error when don't have template input (#5404)

This commit is contained in:
李瑞丰 2022-11-15 15:27:16 +08:00 committed by GitHub
parent 66992ed700
commit 505abfd643
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'create-astro': patch
---
fix error when don't have template input

View file

@ -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);
}